Rainbows are diffracttion of light though raindrops. this is why you usually seem then on sunnay days mixed with showers.
The sunlight gets broken up so you can see the the visible componts of light, starting with violet, going through to green and then red.
A rainbow is seen as light passes through water vapour in the atmosphere (for example after a shower) and the light is bent like in a prism to separate into the components of white ligjt ROYGBIV.
Rain droplets in the atmosphere act like prisms- white light is made up of a spectrum of colours (the rainbow!) and when a ray of white light passes through a prism it splits up so you can see all the colours.
Comments