Mirages occur when light is refracted to produce an image of an object or the sky where it is not. It is most commonly seen on hot surfaces, such as the pavement, or in a desert.
Like rainbows haloes are formed around the Sun due to moisture (in this case ice crystals) being refracted from the Sun’s rays in the upper atmosphere. Sometimes two or more areas of the circle or arcs surrounding the Sun will be brighter, forming what we call Sun Dogs. Haloes can also form around the Moon, and occasionally around the brighter stars and planets like Venus.
To see a rainbow we need sunshine and falling rain. A rainbow is caused by the Sun shinning on moisture droplets, most commonly in a post-rain atmosphere. Early morning and late afternoon are the best times to see them because the Sun must not be too high. Rainbows are always opposite the Sun and their centers are below the horizon at the antisolar point. The lower the Sun the higher is the bow.