Earth’s atmosphere glows in blue because of Rayleigh scattering. It scatters sunlight to every direction. Bluish colors are scattered more than reddish colors. This results in the bright blue color of the sky in the daytime.
There are many misconceptions in the flat Earth community that arise from the lack of understanding of Rayleigh scattering.
During the daytime, an observer receives direct sunlight as well as the scattered sunlight. As the sunlight traverse Earth’s atmosphere, more of its blue component is scattered. As a result, direct sunlight is yellow-orange-ish; and the sky is blue. The observer can turn away from the sun and will see a bright sky because Earth’s atmosphere scatters sunlight.
Just after sunset, the observer can no longer see the sun directly, but the sky is still glowing. We call this ‘twilight.’ Even when the sun itself is not visible, sunlight can still reach the upper parts of the atmosphere. The upper atmosphere scatters incoming sunlight to our eyes so that we see the sky is glowing just after sunset. Needless to say, this phenomenon can only happen if Earth is a sphere.
Twilight is reddish because sunlight arrives at a steep angle and has to traverse a thicker atmosphere than in the daytime where it arrives straight on. A thicker atmosphere means more of the sunlight’s blue components have already been scattered, leaving mostly the reddish component when it arrives at the part of the atmosphere above the observer.
At night, the sky is dark because sunlight can no longer reach us, either directly or indirectly after being scattered.
There is no atmosphere in space. Even if the sun is visible, there nothing in space that scatters sunlight to our eyes, and therefore, we see space as darkness. An observer in space only sees direct sunlight from the sun or the reflected sunlight on sunlit objects.