The sky is blue because of light passing through it. Light from the sun enters Earth's atmosphere, the the layer of gases (air) that surrounds Earth, and hits the atoms and molecules in the air. The light from the sun is made of many colors of light that, when we look at them together, look white.
Source: Hyperphysics |
This is called scattering. Light is an electromagnetic wave that can come in many colors (see What is Color?). What we call "color" refers to the wavelength (and frequency) of light. The concept of wavelength is described in What is Color?. Certain wavelengths, or colors, of light are scattered more often than others. Blue light (shorter wavelength) is scattered more frequently red light (longer wavelength). This scattered light goes in all directions, including into your eye.
Consequently, during the day, the sky appears blue since the scattered blue light, when you look at the sky not around the sun, you are seeing this scattered blue light. At dawn and dusk, you are looking more directly in the direction of the sun. Much of the blue light that the sun sent to earth is scattered in other directions, so less of the blue light reaches you. The light that reaches you tends to be orange and red. Consequently, the sky looks red or orange.