It's the same physics, really. The halos are usually seen when there are high clouds overhead. Those clouds are made of tiny ice crystals, which will refract the sunlight much like a prism will. Those same high clouds can cause a rainbow halo around the moon as well.
It can be a sign that rain is on the way, as high clouds usually precede a storm front.
For More Information: