Sunlight interacting with the Earth 's atmosphere makes the sky blue. In outer space the astronauts see blackness because outer space has no atmosphere.
Sunlight consists of light waves of varying wavelengths, each of which is seen as a different color. The minute particles of matter and molecules of air in the atmosphere intercept and scatter the white light of the sun. A larger portion of the blue color in white light is scattered, more so than any other color because the blue wavelengths are the shortest.
When the size of atmospheric particles are smaller than the wavelengths of the colors, selective scattering occurs-the particles only scatter one color and the atmosphere will appear to be that color. Blue wavelengths especially are affected, bouncing off the air particles to become visible.
This is why the sun looks yellow from Earth (yellow equals white minus blue). In space, the sun appears white because there is nothing in between to scatter its white light.
At sunset, the sky changes color because as the sun drops to the horizon, sunlight has more atmosphere to pass through and loses more of its blue wavelengths. The orange and red, having the longer wavelengths and making up more of sunlight at this distance, are most likely to be scattered by the air particles.
The scattering of visible light by atmospheric gases is most correctly called the Tyndall effect , but it is more commonly known to physicists as Rayleigh scattering after Lord Rayleigh, who studied it in more detail a few years later. Rayleigh Scattering is where red, orange, yellow, and green are passed through and blue, indigo, and violet are "scattered" out creating the color.
Whichever direction you look, some of this scattered blue light reaches you. Since you see the blue light from everywhere overhead, the sky looks blu e.