Short answer
The sky looks blue because air molecules in Earth’s atmosphere scatter sunlight more strongly at shorter (bluer) wavelengths. That preferential scattering sends blue light in many directions toward your eyes.
Step‑by‑step explanation
-
Sunlight is white but made of all visible colors.
White sunlight contains a range of wavelengths (colors) from violet and blue through green and yellow to red. If you spread sunlight out with a prism you see this spectrum.
-
Air molecules are much smaller than the wavelength of visible light.
Oxygen and nitrogen molecules in the air are tiny compared with visible wavelengths (hundreds of nanometers). When light hits particles much smaller than its wavelength, the scattering follows Rayleigh scattering rules.
-
Rayleigh scattering favors shorter wavelengths (blue).
The intensity of Rayleigh scattering goes roughly like 1/λ^4, where λ is wavelength. That means blue light (short λ) is scattered many times more than red light (long λ). So when sunlight passes through the atmosphere, more blue light is diverted out of the direct beam into other directions — including toward you.
-
That scattered blue light is what you see when you look away from the Sun.
If you look at a patch of clear sky, most of the light coming to your eye was scattered from the direction of the Sun. Because the scattering is stronger for blue, the sky appears blue.
-
Why not violet (even shorter wavelength)?
Although violet is scattered even more than blue, several things reduce the sky’s violet appearance: the Sun emits less violet than blue, the human eye is less sensitive to violet, and some violet/ultraviolet is absorbed higher up in the atmosphere. The result is a sky that looks blue rather than violet.
-
Why sunsets and sunrises are red or orange.
At sunrise and sunset the Sun’s light must travel through a much longer path in the atmosphere to reach you. Much of the blue and green light has already been scattered out long before the light reaches your eyes, so the remaining direct light is dominated by longer wavelengths (orange and red). You see those warm colors when you look toward the Sun at dusk or dawn.
-
Role of larger particles and clouds (Mie scattering and why clouds are white).
When particles are similar in size to the wavelength of light (aerosols, dust, water droplets), scattering becomes Mie scattering, which is much less wavelength-dependent. That scatters all visible wavelengths roughly equally — which is why clouds and fog (made of water droplets much larger than molecules) look white.
Quick visual demonstration you can try
- Fill a clear glass with water and add a tiny drop of milk or a pinch of powdered milk. Shine a beam of white light (or sunlight) through the side and look at the light scattered at 90 degrees — it appears bluish. Look along the beam toward the source and you’ll see the beam reddens — similar to sunrise/sunset.
One simple equation
Rayleigh scattering intensity ∝ 1/λ^4 (shorter wavelengths scatter much more strongly).
Summary
The daytime sky is blue because small air molecules scatter shorter (blue) wavelengths of sunlight much more efficiently than longer (red) wavelengths. At sunrise and sunset the light’s long path through the atmosphere removes most blue light, leaving reds and oranges. Clouds look white because larger droplets scatter all visible wavelengths about equally.
Further reading/search terms: "Rayleigh scattering", "Mie scattering", "why are sunsets red", "why are clouds white".