Explanation
A rainbow can also be observed in moonlight. The formation is identical to that of the rainbow, however, it occurs much less frequently. There are various reasons for this.
1. Color Perception
As the saying "At night, all cats are grey" suggests, our eyes have trouble recognizing colors in low light intensity. The cones, responsible for color vision, only function with strong light and therefore take over daytime vision. In advanced twilight or at night, the rods become increasingly active, being many times more light-sensitive than the cones. However, rods cannot detect different wavelengths and are therefore unsuitable for color vision.
That's why a moonbow is often perceived only as a white arc and not recognized as a rainbow. The same applies to moon halos or auroras, which must be bright enough to be perceived in color. The light from big cities further complicates observation.
Unlike our eyes, cameras do not have this problem, which is why photos of moonbows, moon halos, and auroras are always colored. This often leads to observers, who only know the colored photos, being disappointed during their first personal observation.
2. Moon Phases
Moonlight is, of course, less frequent than sunlight. Only the full moon is visible all night, otherwise our Earth's companion rises before nightfall when the moon is waxing and increasingly later during the waning phase. With less than a half moon, the light is usually not sufficient to form moon rainbows. Assuming a "normal" person observes until around midnight, they get about 10 days of observation time in the winter months, and even less in summer.
Additionally, the moon's altitude, especially in winter, rises above 40°. At this moon height, no moon rainbow can form at least in the lowlands.
3. Weather Conditions
A rainbow always appears when it rains with the light source at the observer's back. This is especially the case during showers. Normally, showers are caused by convection, that is, when the ground warms up due to sunlight, warm air bubbles rise, and eventually cool down enough for the air to be saturated with water vapor and condense into water droplets. When the sun sets in the evening, there is no more supply, and the showers collapse. The chances of the moon shining during a shower are much lower than during the day. Only on the rear side of frontal thunderstorms are the chances slightly greater.
Observation
A random observation of lunar rainbows is very rare. However, if you search specifically for them, you can find them more often. An example is Martin McKenna, who has been able to photograph lunar rainbows several times in Northern Ireland (see here).
The best conditions are after a thunderstorm that extends into the night or behind a night-time cold front passage. Statistically, more than half of all lunar rainbows are observed with a moon phase illuminated from 90%, that is, at full moon and each day before and after. The best moon altitude is 20-30°, as the moonlight then does not fall so shallowly that it is dimmed by the atmosphere; but the rainbow is still high enough to be easily seen. When the air is very clear, the tipping point to cone vision can be reached around full moon time, so that the rainbow also appears visually slightly colored under optimal conditions.