A rainbow is a meteorological phenomenon that is caused by reflection, refraction and dispersion of light in water droplets resulting in a spectrum of light appearing in the sky.
Light which is reflected comes from the sun.
We cannot reflect something by staying at the same side as of the object you want to reflect.
So, rainbow is basically reflecting the light of the sun back