The blue color of the sky is due to the scattering of sunlight off of the air molecules in the Earth's atmosphere. When sunlight hits an air molecule, it causes the molecule to vibrate and re-radiate the light off in a different direction. This change of direction of the light is called "scattering." It turns out that blue light is more strongly scattered than yellow or red light, and hence there is more blue light coming to your eye from the parts of the sky away from the sun, causing the sky to appear blue.
Interestingly, on the moon the daytime sky is dark because there is no air to scatter the incident sunlight.
http://hyperphysics.phy-astr.gsu.edu/hbase/atmos/blusky.html