Why is the sky blue?

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 blue.

(*As for why the sky does not appear violet -- the wavelength most scattered -- see the explanation at the related link below.)

Blue light is scattered in all directions by the tiny molecules of air in Earth's atmosphere. Blue is scattered more than other colors because it travels as shorter, smaller waves. This is why we see a blue sky most of the time.
The sky appears blue to us because of the scattering of the blue light component of the light from the Sun. Some alpine lakes also appear a quite light blue colour for the same reason, light is scattered by tiny suspended flakes of minerals in the water.
Because the water particles in the air split the light and Blue light is dispersed the furthest that's why it creates the illusion the sky is blue