In Star Trek: Beyond, star base Yorktown is in space, not in orbit. What creates the day and night cycles, as we see both of these during the film
Yorktown isn't just hanging in deep space. It's in orbit of a small, white star. You can glimpse it in a number of scenes as a reflection.
and in this 'blink and you'll miss it' scene as the bottom edge of the star clips the frame.
As to how they manage the day/night cycle, that isn't immediately apparent. I think we can assume that the "glass" is polarised in some fashion and that it can simply be darkened when they want the station to experience a night period.