Asking this question all throughout my life, it wasn't until within the last year that I finally got an answer that was satisfying! No other question is asked more frequently to shrugging parents who are lucky to know the basic idea behind Rayleigh Scattering (see also the Tyndall Effect).
The basic idea is that on a nice and clear day, the sky appears blue because nitrogen and oxygen molecules in the air scatter blue light from the sun more than they scatter the red light. Similarly, during a sunset we see mostly reds and oranges because the blue light is scattered away from sight.
Ok so this is all fine and dandy and enlightening - whatever. But it leaves a little to be desired. So yay for electromagnetism! Who ever said I learned nothing from that class? Right, that would be me, but lookie here!
It is the sharp frequency dependence of the power formula that accounts for the blueness of the sky (FYI: I would include actual equations here if I had the slightest idea how to type them in the blog - sorry folks... suffice it to say that the total power radiated is directly proportional to the fourth power of omega/frequency). Sunlight passing through the earth's atmosphere stimulates atoms to oscillate as tiny dipoles. Although the incident solar radiation covers a broad range of frequencies (the sun acts as a blackbody radiator - ie, sunlight is categorized as white light), the energy that is absorbed and reradiated by the atmospheric dipoles is stronger at the higher frequencies (because of that w^4 previously mentioned). This basically means that it is more intense in the blue than in the red (since blue light has a shorter wavelength and thusly a higher frequency/energy than red light). It is this reradiated light that you see when you look up in the sky.
For sunsets, the light comes in at a tangent to the surface of the earth and so must pass through a larger area of the atmosphere than the light oming in from overhead. So in a simila argument to mine above, much of the blue has been removed by scattering and what is leftover is red.
Damn, I need to go back to school. This shit is way too interesting to be writing in a blog (esp when y'all prolly don't even care).
(with much help from Dr. Weston and Griffiths Electromagnetism)