Sundogs are caused by a layer of ice crystals between your eyes and the sun. The crystals cause a refraction of the light somewhat similar to the process that forms a rainbow, except that the refraction is different with ice crystals than with raindrops.