Sky is not blue but it seems to be blue. This is because in out planet Earth there is atmosphere composed of different gas molecules. This thick atmosphere diffracts the light coming from Sun. As Sun light is composed of different light rays including seven visible light rays. Among the seven types of visible rays the blue one is with the shortest wavelength remains in the atmosphere for longer time then other components of the light. This blue component of light gets dispersed around the atmosphere so that sky appears to be blue.
This phenomenon is thus based on dispersion of light rays coming from the Sun.