There is a course theme button on the left side of the Editor. When clicked, it reveals a Course Theme menu.
When starting the game, the Course Theme menu does not contain a sun/moon button. It's unlocked after the player places an Angry Sun into any course, and then changes it into The Moon. Once it's unlocked, it's unlocked for eternity.
Note: Night Themes do NOT exist in Super Mario 3D World Game Style, because the Angry Sun course element isn't present there. Night Themes have The Moon instead of Angry Sun and different music. They also have special Night Effects