Check the Atmospheric Scattering section in the rendering papers thread. It's basically all about light getting wavelength-dependend absorbed and scattered away while traversing the atmosphere. During dawn and dusk there is more atmosphere the light has to traverse, which results in the color change.