Rainbows need very specific conditions to be visible. The optimum conditions consist of a short morning or evening rain and a very bright sky. When this happens, a major part of the water droplets are still in the sky and the sunlight scatters through them and creates different colors depending on a range of factors.
When the sunlight passes through a droplet, it scatters into a range of colors, but some of them are more visible than others. The colors are visualized in the curved part of the droplets and this is why rainbows always form an arc.