This question has been asked over 5000 times, and I've prepared a simple answer, without too much science:
The correct answer is that the blue light is scattered by the air molecules in the atmosphere (referred to as Rayleigh scattering). The blue wavelength is scattered more, because the scatteing effect increases with the inverse of the fourth power of the incident wavelength.
OK, but I've known science graduates who don't understand what this means.
Here's my attempt at an answer without too much physics:
I think most people know that sunlight is made up of light of several different wavelengths, and can be split up into the colours of the rainbow. Blue light has the shorter wavelength, and red the longest wavelength.
When sunlight hits the molecules in the atmosphere, the light strikes the molecules and is absorbed, causing the molecules to vibrate and give off, or 're-emit' the light. It's not the same as reflection, but the effect is similar. The molecules in the air are much smaller than the wavelength of visible light, but because the blue wavelength is shorter and more energetic, it reacts much more with the air molecules than the red and yellow wavelengths; which tend to pass straight through.
Because the blue radiation is re-emitted from the air molecules in all directions ('scattered'), it seems to us looking from the ground that the blue light is coming from everywhere; hence the sky seems blue.
Near sunset, because of the low angle of the sunlight, we see more of the red and yellow wavelendth passing straight through, hence the colours of the setting sun.
BTW: The sky isn't blue because of a reflection of the sea; its the other way round, although the blue colour of the sea is mostly caused by the water molecules scattering the blue light, in a similar way. This effect is even stronger with ice; which results in the intense blue colour we see if we look down a crevasse in a glacier, or down a hole in the snow made by a ski stock..
For a complete, scientific explqanation, look up 'blue sky' in Wikipedia.