

The Rayleigh scattering is inversely proportional to the fourth power of wavelength. This means light with higher wavelengths in red and yellow colors are scattered very less and reaches to the observer.
When the sun is near the horizon, the scattering is more due to the large volume of air that the sunlight must pass through. Since the scattering is more, all the lights of shorter wavelengths are virtually removed showing only the mixture of lights with longer wavelengths (yellow+red = orange).
