So, what are sundogs? A sundog is very similar to a rainbow. Both phenomena are produced by the refraction and reflection of light through either water droplets or ice crystals. However, a rainbow appears when looking away from the sun, while a sundog appears when looking directly at the sun.
In the case of sundogs, light is refracted through ice crystals associated with very thin cirrus or cirrostratus clouds. This causes some white and some colorful spots on either the left, right, and sometimes both sides of the sun (at approximately 22 degrees). The ice crystals act like tiny prisms (in the case of rainbows, water droplets act as the prism) which break down visible light into its component colors. In the case of colorful spots, the colors typically go from red on the side nearest to the sun to blue furthest away. Occasionally a full halo will appear around the sun along with the sundogs.
Even though sundogs are not an everyday occurrence, it is not rare to see one. It is just a matter of the sun being in the right spot along with the presence of ice crystals in high clouds. Typically, sundogs are best seen near dawn or dusk when the sun is low on the horizon.