The rest of the explanation is pretty dull, so only carry on if you're made of stern stuff. First, here is some South African Blue sky for you. It's Pilgrims Rest in the Low Veld - A lovely place if you're visiting.
Sunlight travels in a straight line from the sun and as it passes though our atmosphere the light interacts with nitrogen and oxygen and the impact scatters the white light in all directions. The shorter the wavelength of light the more it gets scattered, in the visible spectrum violet gets spread the most, but we are a lot more sensitive to blue, and since blue light has a lot shorter wavelength than red light, it's scattered 10 times as much, hence we see a blue sky.
This is known as the Tyndall Effect or Rayleigh Scattering.
So, why is the blue sky darker when you are higher up?
This is because there is less atmosphere and less scattering occurs. If you had flown in concord while it was in service, you could see the curve of the earth, and you could visibly see the darker sky getting lighter towards the ground.
So, what about sunsets, why are they red?
For the same reasons as above, all colours of light are scattered in the atmosphere. At sunset, the sunlight has to travel a lot farther to get to you, and so by the time it does hit you, the blue has already been separated... leaving the oranges and reds more visible.
Ah, but what about great purple sunsets?
When the sun sets, the horizon blocks the direct light from the sun. This means the light we see is being diffracted from high above us. Depending on the particles in the air, depends on the amount of diffraction. As it is minus 60 degrees Celsius up there, generally ice crystals float about. When certain conditions are about, the ice can form perfectly into spheres, and then refraction occurs, this changes the way light is bounced back to us.
Diffraction, refraction; what's the difference?
Diffraction and refraction are similar, but different enough to have different words. Refraction occurs when light changes medium, for example through a droplet of water, or a prism. Diffraction occurs when something gets in the way of light and it interferes with itself.
There is no law against light interfering with itself in public. There are MANY laws against you doing it!.