scattering of light by tiny particles in air to produce the colors we see on sky, is dependent on the following factors:
(i) wavelength of light
(ii) size of the scattering particle
(iii) distance traveled by light through the atmosphere.
according to rayleigh's law of scattering, the amount of scattering is inversely proportional to the fourth power of its wavelength. shorter the wavelength, greater is its scattering. hence violet/blue light is scattered more than red.
sun's light is a composite light ( visible light) with wavelengths in the range 400 nm (violet) to 700 nm (red). as sunlight passes through our atmosphere, the molecules of air scatter light according to their wavelengths. during sunrise and sunset, the sun's position is below the horizon. hence light from the sun travels a greater distance in the atmosphere when compared to its position a noon.
as sunlight enters the earth's atmosphere, blue light is scattered away and at the end of its journey in the sky, only red and orange wavelengths remain in the beam.
hence at sunrise and sunset, the sky appears reddish orange.