Why the Sky Is Blue (and Sunsets Are Red)
Sunlight looks white, but it is a mix of every color. When that light enters the atmosphere, it bumps into gas molecules, mostly nitrogen and oxygen. Those molecules scatter light in all directions, and they scatter short wavelengths, like blue and violet, much more strongly than long ones, like red and orange. This is called Rayleigh scattering.
So why is the sky blue and not violet? Violet is scattered even more, but the sun puts out less of it, some gets absorbed high in the atmosphere, and our eyes are far more sensitive to blue. Blue wins.
Sunsets flip the story. When the sun sits low on the horizon, its light has to cross a much thicker slice of atmosphere to reach you. Along the way most of the blue gets scattered out of the beam and sent elsewhere. What is left is the warm end of the spectrum, the oranges and reds that make a good sunset worth photographing.
Dust, smoke and haze can push this further. That is why skies after wildfires or volcanic eruptions often glow a deeper red at dusk.
You can see a small version of this at home. Shine a flashlight through a glass of water with a few drops of milk stirred in. From the side the beam looks bluish, and the light that comes out the far end looks a little orange. Same physics, smaller sky.