
To switch between light and dark themes in Calc, follow the following steps:
1: click on Tools -> Options... on the menubar to open Calc's preferences dialog window. It has a list-detail layout.
2: navigate to LibreOffice -> Appearance on the side pane. The main pane will display appeareance-related options. It's worth noting that these are settings shared across all LibreOffice applications, including LibreOffice Writer, and not a setting specifically for LibreOffice Calc.

3: under Options, Appearance, change the setting from System to either Light or Dark.
4: click OK or Apply to save the new preferences.
Troubleshooting
Only The Spreadsheet Becomes Dark, The Rest of the Window Remains Light
It's possible that the color of the spreadsheet and the text on the buttons will change, but the background color of most of the graphical user interface will not, making a lot of the text unreadable. If this happens to you, do not panic. Close the preferences dialog, save your documents (with the keyboard shortcut Ctrl+S if you can't find it on the menubar), and then close LibreOffice Calc. When you reopen Calc again, the interface should display correctly.

Note: this happened to me on Windows 11.
Switching Back to System Theme Doesn't Work
If you switch back from Dark to System, it seems there is a bug that makes the grid black even after you restart. A workaround is to select Light instead of System.

Note: this happened to me on Windows 11.