It's the same physics, really. The halos (or, sometimes known as "sundogs" around the sun) are usually seen when there are high cirrus clouds overhead.
Those clouds are made of tiny ice crystals, which will refract the sunlight much like a prism will and voila! You have a rainbow halo around the sun.
It works the same way with moonlight, and it'susually a sign that rain is on the way, as high clouds usually precede a storm front.
Have you seen these rainbow clouds? If you've got photos, I'd love to see them and add them to our photo gallery here. You can email them to me at firstname.lastname@example.org.
Get more information and see more photos of different sun halos in My weather blog, "Partly to Mostly Bloggin"