Answer
Both moon halos and rainbows are produced by light refracting from water (however, it's ice in the first case, liquid water in the second case).
Work Step by Step
A moon halo, also known as a moon ring or a $22^{\circ}$ halo, occurs when ice crystals refract moonlight into a circle. This is similar to how water droplets reflect and refract light into rainbows.