That same question was asked by the Irish physicist John Tyndall more than 150 years ago. Tyndall, in addition to a long list of scientific achievements, studied atmospheric optics to answer the enigma of the color of the celestial vault.
And Tyndall explained why the sky is blue. He did so in the 1860s at the Royal Institution in London, where he served as professor of physics for 34 years. In the course of his research on the radiant energy of the air, he constructed a glass tube that simulated the atmosphere , with a white light source at its end that acted as the sun. Tyndall noted that as he introduced smoke into the tube, the light beam looked bluish from the side of the tube, but reddish from the end away from the source.
That phenomenon led him to propose that dust and vapor particles in the atmosphere scatter blue light, which reaches our eyes. Today we know that blue scatters more because of its shorter wavelength , while red penetrates more because it is the longest wave of visible light. When the path of light through the air increases, as it does at sunrise and sunset with the sun lower, the blue scatters before reaching our line of sight and we observe the scattering of red.
Curiously, Tyndall was right when he was wrong. The so-called Tyndall effect today describes this phenomenon of dispersion in fluids of fine particles , but what we see in the sky is really the so-called Rayleigh scattering, caused by the molecules of the air with sizes much smaller than the wavelength of light. (and not because of the much larger dust particles). Actually, it's a technicality that doesn't stop moms and dads all over the world from having to thank Tyndall's genius.