Rainbows are created by both reflection and refraction (bending) of light in water droplets in the atmosphere, which results in a spectrum of light appearing.
Rainbows can be seen not just in rain but also mist, spray, fog, and dew, whenever there are water drops in the air and light shining from behind at the right angle.