The absence of light in the sky leaves it black. The sun is a pale yellow. Where does the sky's blue color come from?
‘Why is the sky blue' tends to be a question that is asked during times when one is lazy enough not to follow through on getting the answer. It's a question that gets asked by people when they're sitting in the grass after a picnic, or when they're floating in a swimming pool, or when they've just tripped and fallen and are lying on the ground trying to pretend that they either meant to hit the floor or have hurt themselves badly enough that no one will laugh at them. But I digress to something with which I assure everyone I have no personal experience with, and which will not be seen on some stupid internet America's Funniest Home Videos knock-off show.
The point is, we have time now to explore the phenomenon without worry about a head wound, and the question remains. The stars, when looked at at night, are a whitish blue, the sun is a whitish yellow. Water vapor could arguably be a reason why the sky is blue, if bunched-together water vapor – clouds - didn't usually look white and gray. Where does this strange blue color come in?
The answer is, it comes from the light of the sun; it just comes from only a part of the light of the sun. The uniform blue of the sky is the result of the Rayleigh scattering of the sun's light. Rayleigh scattering describes the way light can veer off in nearly every direction when it moves through particles around one tenth the size of its wavelength.
The sun emits all different wavelengths of light, but the visible spectrum ranges from about 400 to 700 nanometers. The oxygen and nitrogen in our atmosphere is the right size to scatter much more of the high energy, low-wavelength blue light than the light at the lower-energy, long wavelength end of the spectrum.
The oxygen and nitrogen molecules in the atmosphere, and the way light scatters off them, result is a bright, glowing blue sky. Light comes into earth's atmosphere and gets scattered and scattered until every part of the sky is illuminated.
A good way to understand this is to picture the way water travels. A single stream of water falling down is easy to avoid, even if it's powerful. Now imagine it hits something on the way down – a rock or a piece of metal. The stream divides up, spraying a little to either side. If those two streams hit two more objects, the streams will splatter again. Keep adding more objects in the path of the water. What was once a focused stream of water will turn into a downpour from every direction. A person underneath will look up and see water coming from everywhere.
That's what we see when we look up at a blue sky. The light – especially the blue light - is splattered and scattered so much that wherever we look, we see a blue glow.