What is a sun dog? A sun dog is an optical phenomenon caused by sunlight refracted by ice crystals. Sun dogs are concentrated bright patches of light that form on either side of the sun, often associated with cirrus clouds. They form at the same altitude and angle, 22 degrees. The sun would normally be close to the horizon for sun dogs to form.
The ice has to be shaped as a hexagonal plate for the sunlight to refract off it. Sun dogs often appear white but can be as colorful as a rainbow. The color red would be on the inside (closer to the sun) and blue would be on the outside.
Sun dogs are often associated with sun halos. A sun halo is a giant circle of light that is formed around the sun. The circle would be 22 degrees wide around the sun. The same hexagonal platelets are needed to refract the light. Unlike the sun dogs the sun can be high in the sky for a halo to form.
The same optical phenomenon can be seen with the moon.