Light from the sun travels through space to Earth's atmosphere. What will light waves do when they move from empty space into matter made up of different gases?
They slow down, which may cause them to refract.
The speed of light in vacuum is the highest possible speed (according to Einstein). It's
When light goes into a denser medium (and any medium is denser than vacuum) it slows down.
For instance the speed in air is:
In water it goes down to
If light hits a boundary (vacuum to denser) at an angle it will bend, or be refracted. Since not all colours have the same retardation, red light tends to be bent less than violet, with the other colours of the spectrum somewhere in between. This - in our daily life - creates rainbows.