A moonbow (also known as a moon rainbow or lunar rainbow) is a rainbow produced by moonlight rather than direct sunlight.
Other than the difference in the light source, its formation is the same as for a solar rainbow:
It is caused by the refraction of light in many water droplets, such as a rain shower or a waterfall, and is always positioned in the opposite part of the sky from the Moon relative to the observer.
Moonbows have been mentioned at least since Aristotle's Meteorology (circa 350 BC).
Source
Other than the difference in the light source, its formation is the same as for a solar rainbow:
It is caused by the refraction of light in many water droplets, such as a rain shower or a waterfall, and is always positioned in the opposite part of the sky from the Moon relative to the observer.
Moonbows have been mentioned at least since Aristotle's Meteorology (circa 350 BC).
Source