The color of the sky is due to the scattering of the sunlight by the atmosphere particles. These particles scatter sunlight depending on the wavelengths of the different components of radiation from the sunlight.
Shorter wavelengths are scattered the most, and because blue wavelengths are shorter than other wavelengths for the other colors, blue light is scattered the most and then the sky is blue.