"Why's the sky blue" is one of the most basic, if not first scientific questions someone may ask in their lifetime. It seems like it has been answered a million times. The Wikipedia entry about why the sky is blue unfortunately has a lot of its facts poorly explained or it exclusively covers a few aspects of the physics behind the sky being blue, and at other times the article goes into so much detail on a certain aspect that I can only imagine some readers will just glance over the article. So I thought I'd see if I could give a firm over-arching explanation without going into details that would put-off the non-scientific reader.
The sky is not actually blue, nor is your blood actually red. It all depends on when and how you perceive it. For example, the reason why people believe blood is actually blue inside the body is because our veins appear blue to the human eye. However, the actual blood inside the vein is still a reddish colour but the veins cause the blood to look blue to our vision due to something called "Rayleigh scattering." The reason they appear blue is the same reason water or the sky looks blue. Rayleigh scattering is caused by the scattering of light by particles much smaller than the wavelength of the light. You can observe it when light travels in transparent water and gases.
Imagine a man standing on top of the earth. When the sun is directly above him then the sun rays have to go through the sky and clouds and then to the man's eyes. However, if the sun were located horizontally to the man, then the sun would have to travel through the sky again, but this time it would also be travelling through the horizon itself, which could include the city, farms, or bodies of water. This difference of what the sun rays travel through is what determines whether the sky is red or blue. (Refer to image below)

On the left the man views a small amount of atmosphere, so the sky is blue. In the right panel the man views a large amount of atmosphere and the sky turns red. For the 2nd man on the right, the sky is still blue because there's no horizon for him.
If the sun is only above our heads then it will only have to pass through the atmosphere to reach us (no cities and no farms) and that means it will mostly hit nitrogen particles. Each colour moves in a specific wave. The wavelength of blue is a short one while red is a long wavelength. That means a blue wave moves up and down more often than a long wave length. And if it's fluctuating more often then it's chances of hitting a particle are more likely as well. Thus, a blue wave will hit more nitrogen particles, and scatter around to give the sky a blue look. (Refer to image below)

While the red wavelength is long it's chance of hitting the nitrogen particles in air are less likely. While the blue wavelenght, which is short, will have an increased chance of hitting nitrogen and scattering blue light.
However, when the sky is at the horizon, there is more atmosphere between the observer and the sun. On top of that there is more than just nitrogen in the atmosphere, such as dust particles and pollution. Because there are more particles in the air, the red wavelengths manage to hit enough particles to scatter as well. So while the blue light scatters first, the red light follows by the end and the observer in the horizon is left watching only the red light scatter. Funnily enough, while a non-polluted horizon would still leave the sky lightly red, the redness is intensified by pollution. So a beautiful red saturated sky is usually the cause of ugly city pollution.
Now that you know a little about why sunsets are red. It's time to explain the "green flash" that you may have observed when a sun finally goes down in the horizon. The question is, where does the colour green come from? Well, the green and blue wavelengths, because they're short, manage to curve the earth better than the red wavelength. Because the earth curves, the atmosphere around it curves as well. And because the atmosphere is curved, so does the density of the atmosphere's air, which causes sunlight to curve slightly as well. And since green/blue light curves the best, they are the only two lights that we'd be able to see. Yet, as mentioned before, the blue light in a horizon has already been scattered so we're actually left with only the green light to be seen in the green flash.

A large green flash just before the sun sets.
Blue flashes are still possible if the horizon are relatively free of pollution, and indeed some have been observed. In fact, when Lord Rayleigh (Rayleigh being the man that the Rayleigh scattering effect is named after) did his famous experiment of 1934 of trying to re-create the green flash he found that he was left with only the blue flash. However, when he added more particles to the man-made atmosphere in his experiment (So that it resembled Earth's atmosphere) the green flash was observable.
1 So if you'd like to observe a rare blue flash your chances would increase if you're horizon is not polluted. That being said, I personally think a green flash is more beautiful and once again it's funny that pollution is the cause of all this beauty...not that I'm defending pollution, just the irony.