That is not exactly true. The reason of why the sky is blue (at least on Earth, with ordinary physics and standard air composition) is that the light gets scattered on gas molecules (not large ones like dust in the desert, or water vapour in the clouds) - actually it gets absorbed and emitted again (this time in random direction). It is called Rayleigh scattering. The higher frequencies gets scattered more, so there is more blue light (high end of visible spectrum) that gets scattered than any other color. So the ambient color of the sky is due to the scattering of blue light. It has next to nothing to do with the angle - that is beside the fact that if you look at the sun you will see mainly the light going in straigh line, not scattered. If not for atmosphere the sky would be black."I asked the same thing. He said that the sunlight hits the air at an angle that makes the air absorb or reflect away most of the other colors, making the sky appear to be blue. And when it's sunrise or sunset, the sun strikes the air at a different angle, which makes it look a different color."
The setting and the rising sun is red because this time the light from the sun must travel (in straight line) through thick layer of atmosphere. The blue light gets scattered away, next green... so only red light (low end of visible spectrum) remains.
In a few words: the sky is blue because the light from Sun which otherwise would go to us gets scattered towards us, and blue is most strongly scattered. The setting/rising sun is red, because the blue (and green) color is taken from it.
URL: http://www.sciencemadesimple.com/sky_blue.html