Gas molecules in the atmosphere cause scattering of the higher-energy blue portion of the sunlight more often than the lower-energy red portion of the sunlight. The sun is a reddish-yellow color, whereas the blue waves scatter about the surrounding sky; therefore giving it the blue color. You can find more information here: http://www.enchantedlearning.com/subjects/astronomy/planets/earth/Skyblue.shtml