The sky appears blue because of a phenomenon called Rayleigh scattering. When sunlight enters the Earth’s atmosphere, it interacts with the molecules in the air. The air is composed primarily of nitrogen and oxygen molecules, which are much smaller than the wavelength of visible light.
When sunlight enters the atmosphere, the blue portion of the light is scattered more than the other colors. This is because blue light has a shorter wavelength and is more easily absorbed and re-emitted by the small nitrogen and oxygen molecules in the air. As a result, when we look up at the sky, we see more blue light than any other color.
This is why the sky appears blue during the day. However, during sunrise or sunset, the sun’s light has to pass through more of the Earth’s atmosphere, and more of the blue light is scattered away, leaving a reddish-orange tint in the sky.