At dusk, light from the sun has to travel through much more atmosphere compared to when the sun is overhead.
Blue light and all the other colors are scattered around (and diluted) so much so that only red, orange and yellow light remains visible.

Light is not scattered just by the atmosphere itself (oxygen and nitrogen). It is more correct to say that light is scattered by the particles in the atmosphere.
The particles in the atmosphere are mainly:

  • oxygen
  • nitrogen
  • clouds containing:
    • solid water
    • water vapour
    • ice
    • snow (water in gas form that is frozen)
    • pollution
(Red, orange and yellow light have the longest wavelengths and are least affected by 'bumping' into oxygen atoms in the atmosphere.)

The red you see at sunsets reached your eyes more or less in a straight line directly from the sun.

By comparison, the blue sky is from billions of scattered (bounced around) reflections of blue light coming from all directions.


more such trivia can be found at why-is-the-sky-blue.org