This is a matter of Human Interface Guidelines for the platform you're developing, and those differ between platforms as well as evolve over time.
Here is a selection of those:
Note that proper nouns are an exception here — those should always use title case.
If you're developing for the web, the choice of guidelines to follow is up to you.
And in addition to these, I'd also recommend choosing a complementary publishing style guide, such as The Chicago Manual of Style or the AP Stylebook. These guides provide much more complex guidelines on a wide range of topics, including date formatting, m-dash vs n-dash use, use of spaces and more.
It's worth noting that the above applies to English only. Some other languages allow similar freedom of style choice, in which case it's advisable to find an appropriate style guide for that language or define one for yourself. And some languages have strictly defined rules that don't allow for style choices. (For example, in Czech, sentence style is always used for labels.)