The ring is caused by sunlight or moonlight being diffracted as it passes through cirrostratus clouds that are usually at altitudes above 20,000 feet. Cirrostratus clouds are composed mostly of small ice crystals that spread out into a thin layer. They are sheet-like, and the sun and moon can be seen through them easily.
Halos are most commonly seen as a white ring around the sun or moon, but sometimes they can appear as a rainbow-colored ring with red on the inside and going to blue-white on the outside. This is seen more often around the sun than around the moon.
Halos most commonly form at a 22-degree radius. A more rare halo is the great halo, which forms at a 46-degree radius.
Good for Predicting Weather?
A ring around the sun or moon in the warmer months is a good, but not guaranteed, indication there might be precipitation within 12 to 24 hours. Cirrostratus clouds usually come before a warm front, which often brings precipitation.
Halos around the sun and the moon have been recorded as far back as the time of emperor Constantine at the beginning of the fourth century, but it is unclear as to when halos began to be associated with weather prediction.
What causes this phenomenon?
A ring around the sun or the moon is also called a halo.
A science website called highlightskids.com explains that this is caused by the scattering of sunlight by tiny ice crystals very high in the sky. High clouds of ice crystals high in the sky are called cirrus clouds, or cirrostratus if they form a layer. These often form in front of warm fronts that bring rain.
So, a halo around the Sun or Moon is often a warning that rain may come.