Think of the Earth’s atmosphere as a prism of solid glass. White light refracts through its polished surfaces and separates into the colors of the rainbow. Refraction is the bending of light as it passes from one transparent substance into another, here from air into glass.
When the Sun’s white light passes through the atmosphere, that is, the prism, the light is refracted into all the individual colors. Each color comes from an electromagnetic wave. Red has the longest and slowest wavelength. Blue and violet move in quick, short waves.
The colors undulate charged particles in the air molecules, particles such as oxygen and nitrogen. About 99% of the Earth’s atmosphere is composed of two species of diatomic molecules: nitrogen (78%) and oxygen (21%). NO2 is nitrogen dioxide, dangerous. Alexander (nine) and I like thinking about using dangerous chemicals in our stories. Why else think about them?
Anyway, what happens? Blue and violet are scattered in all directions at around 10 times the efficiency of red light, so they get the highest coverage area in our sky.
My little brain thinks of efficiency as how fast you can get dressed when you are running late.
However, our eyes are more sensitive to blue than violet, which is why we see the sky as blue.