Rainbow formation is combined result of reflection, refraction and dispersion of sunlight from many water droplets in atmosphere. When sunlight enters into a spherical rain drop, it is dispersed and refracted . This will cause bending of different colours of light in different angles. When these different colours of light fall on the back inner surface of drop, it reflects (different colours of light) internally ( which is total internal reflection). From the second surface of the the water drops, it again refracts the different colours, when it comes out from the raindrop. After that these different colours from the raindrop look as a rainbow which will reach our eye. Thus, we see a rainbow.