Why rainbow always appears in opposite direction of the sun
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.
Now I won't get scientific, but apply your logic here.
Light which is reflected comes from the sun. So, rainbow is basically reflecting the light of the sun back. So think, how can you reflect something by staying at the same side as of the object you want to reflect?