The way light scatters off molecules in the atmosphere explains why the sky is blue and why the sun looks red at sunrise and sunset. In a nutshell, it's because the molecules scatter light at the blue end of the visible spectrum much more than light at the red end of the visible spectrum. Scattering is a measure of the probability that light will interact with molecules when it passes through the atmosphere.
Scattering a 1/l4
Violet light (l = 400 nm) is almost 10 times as likely to be scattered than red light (l = 700 nm). At noon, when the Sun is high in the sky, light from the Sun passes through a relatively thin layer of atmosphere, so only a small fraction of the light will be scattered. The Sun looks yellow-white because all the colors are represented almost equally. At sunrise or sunset, on the other hand, light from the Sun has to pass through much more atmosphere to reach our eyes. Along the way, most of the light towards the blue end of the spectrum is scattered in other directions, but much less of the light towards the red end of the spectrum is scattered, making the Sun appear to be orange or red.
So why is the sky blue? Again, let's look at it when the Sun is high in the sky. Some of the light from the Sun traveling towards other parts of the Earth is scattered towards us by the molecules in the atmosphere. Most of this scattered light is light from the blue end of the spectrum, so the sky appears blue.
Why can't this same argument be applied to clouds? Why do they look white, and not blue? It's because of the size of the water droplets in clouds. The droplets are much larger than the molecules in the atmosphere, and they scatter light of all colors equally. This makes them look white.