more water droplets are present in the air after the rain & light refracts when it passes through water droplets ->  light is more easily to be refracted after the rain  light is more easily to be refracted after the rain & refracting light causes light to split into different colors ->  light is more easily to be split into different colors after the rain  light is more easily to be split into different colors after the rain & a rainbow is formed by refraction of light by splitting light into all different colors ->  a rainbow is more easily to be formed after the rain through light refraction  a rainbow is more easily to be formed after the rain through light refraction & sunlight is a kind of light -> sunlight and rain can cause a rainbow