Azuliskye — Atmospheric optics and sky colour: why the | azuliskye.net
The daytime sky is blue because air molecules scatter short wavelengths far more strongly than long ones, and the scattered sunlight that reaches your eye peaks in the 450-495 nm blue band.
Stand outside on a clear day and the light falling on you comes in two parts: a direct beam from the sun, and a diffuse glow from every other point of the sky. The direct beam has travelled nearly straight down; the glow is sunlight that air molecules knocked off course, and it is the glow that carries the colour.
Air is about 78% nitrogen and 21% oxygen by volume, and its molecules are far smaller than the wavelength of visible light. Scattering by such small particles follows the Rayleigh law: intensity scales with 1/λ⁴. Blue light at 450 nm therefore scatters about 5.5 times more strongly than red at 700 nm.
On narrow screens, swipe or scroll the plate sideways.
The visible band runs from about 380 to 700 nm. Violet at the short end scatters most of all, yet the scattered light that reaches your eye peaks in the blue at 450-495 nm — and that peak, arriving from every direction at once, is the colour you call sky.
Because about 75% of the atmosphere's mass sits below 12 km, nearly all of this scattering happens in the lowest, densest layer. The blue dome is, quite literally, a low-altitude phenomenon.
The same law that makes noon blue makes sunset red: over a much longer path the blue is scattered out of the beam entirely. That half of the story is in Why Sunsets Turn Red and Orange, and the high-altitude exceptions are in Halos, Nacreous Clouds and Aurora.
Further reading