The atmosphere contains free molecules and atoms with different sizes.
this molecules and atoms scatter light of different wave lengths which
are comprable to their size. molecules having a size that is comprable
to the wavelength of red light are less in the atmosphere. hence
scattering of red light is less when compared to the other colours of
light.the light from the sun needs to travel more distance in atmosphere
during sunrise and sunset to reach your eye. in morning and evening
times during sunrise or sunset, except red light ,all colours scatter
more and vanish before they reach you. since scattering red light is
very small, it reaches you.As a result sun appears reddish in sunset and sunrise.