Light is made up of electromagnetic waves.

The distance between 2 crests in this wave is called the wavelength.

White light contains all the colors of the rainbow.

The amount of light scattered for any given colour depends on the wavelength of that colour.

All the colors in white light have different wavelengths.

Red light has the longest wavelength.

The wavelength of blue light is about half that of red light.

This difference in wavelength causes blue light to be scattered nearly ten times more than red light. Lord Rayleigh studied this phenomena in detail. It is caused the Tyndall effect or Rayleigh scattering.

Lord Rayleigh also calculated that even without smoke and dust in the atmosphere, the oxygen and nitrogen molecules would still cause the sky to appear blue because of scattering.

When blue light waves try to go straight through an oxygen and nitrogen molecules, its light is scattered in all directions because of this collision.

This scattered blue light is what makes the sky blue.

All other colors (with longer wavelengths than blue light) are scattered too.

Blue light's short wavelength causes it to be scattered the most.

(The shorther the wavelength of the color, the more that color gets scattered by the atmosphere)

Actually, violet has the shortest wavelength of all colors. Violet is scattered even more than blue light. However, our eyes are much more sensitive to see blue than violet, therefore we see the sky as blue.

Very little visible light is absorbed by the atmosphere.

Blue sky: summary
Blue light's short wavelength causes it to get scattered around 10 times more by oxygen and nitrogen molecules than the longer wavelengths (like red) of the other colors visible to us.

The blue in the sky we see is scattered blue light.