The sky appears red looking towards the setting sun, but blue overhead. Photos Mike Gal.
Light (with wavelength λ) is scattered by what we call Rayleigh scattering. For small scattering centres, the intensity of the scattered radiation is proportional to λ−4,
so blue light is much more strongly scattered than red or green. As shown in the figure above, a person looking upwards sees light that has been scattered by the air, usually once. Blue light comprises the majority of this scattered light.
When the sun is close to the horizon, light coming from it must traverse a long path through the atmosphere. Along this path, nearly all of the blue light
and most of the green is scattered out, leaving primarily red light to travel directly to the viewer (red sun) or to be scattered at a small angle towards the viewer (red sky). When the sun is fairly low in the sky, but not yet setting, the light from the sun passes through a shorter path through the atmosphere, but not as short as when the sun is overhead. If much blue light is scattered out but most of the green is left, and green plus red gives yellow. So the white sun looks yellow when it is low in the sky.
Chromatic dispersion, rainbows and Alexander's dark band
Dispersion and chromatic aberration
The multimedia tutorial Geometrical Optics also has a longer list of support pages