Sun halos, sun dogs and sun pillars are all optical effects that appear in certain atmospheric conditions. Their effects are caused when water droplets and/or ice crystals act as a prism and allow us to see some of the colours that make up visible light. These ice crystals appear in thin cirrus clouds that generally occur in pleasant weather.
Sun halos are rings of light that form around the Sun, they are created due to sunlight refracting off the ice crystals that are found in cirrus clouds. When the sunlight is refracted inside the ice crystals, it creates a rainbow effect, showing all of the colours that come together to make up visible light. Sun halos are mostly seen as a bright circle around the Sun, however sometimes, when the rainbow effect is more prominent, the circle can appear as many colours.
Sun dogs are similar to sun halos in that they occur as a result of sunlight refracting inside ice crystals. Unlike sun halos, sun dogs are coloured spots of light that appear around 22 degrees either to the left or right (sometimes both) of the Sun. The colours seen within most sun dogs start from red, on the side closest to the Sun, and go through the spectrum to blue.
Sun pillars are completely different from sun halos and sun dogs as they are created as a result of falling ice crystals that reflect the sun’s light. They appear as a pillar of light extending vertically above the sun. They are more frequent at sunrise and sunset when cirrus clouds are present.