In our Solar System, all the gas giants have ring systems. However, why do these rings form rings and not a cloud of debris around the planet?
There are different theories as to how planetary rings form, and so there are different answers to your question.
One theory of planetary ring formation is that a small (or large, depending on the ring size) moon wandered into the gas giant's Roche limit (the radius from the celestial body inside which no second celestial body can stay intact due to tidal disruptions by the larger body). The moon would have been orbiting the planet, and would thus have been moving in a flat plane. The resulting debris would have continued to move in a plane, because there would be no forces inducing them to move "up" or "down".
Another theory is that the debris is left over from the early solar system. A protoplanetary disk formed around the Sun; it contained all the material that makes up the planets. Over time (and through a lot of collisions!), bits of the material slammed together and formed planets. The trouble is, not all of that material became planets. Some became asteroids, some became comets, and some became moons (although the theory of the formation of the Earth's moon is a bit different). Some of this material could also have coalesced around planets. Now, the protoplanetary disk would already have been in a disk shape. Why? Think of a rotating object - like a planet. You might have read that the Earth is not a sphere. Aside from the obvious deviations of mountains and valleys, some of the deformation comes from the Earth's rotation. Any rotating body will flatten a little around its equator; a spherical body will become an oblate spheroid. The same thing happened for the protoplanetary disk - it became a disk because it was rotating! Any material that coalesced around planets would already be in a plane - that's why the planets' orbits aren't at odd angles to each other. So this material would be in a flat shape if it was captured by the planets, and would become a circular ring because of rotation. And if, at that point, there was material that wasn't in a flat plane, it would become flat by the same process that made the protoplanetary disk flat.
I hope this helps. That was a cool question.
There are stellar systems where the protoplanetary disk isn't in the same plane as the star's rotation. This could affect planetary orbits; however, such systems have not been thoroughly studied because of their rarity.
Just realized something. The gas giants are the most massive objects in the solar system, besides the Sun. Is it a coincidence that they all have rings? Probably not. I can think of two answers to this, which I suppose relate to your question: 1) the gas giants have rings because they were massive enough to attract moons, and thus more likely to have a moon enter into their Roche lobes, or 2) they gathered up more material (here's the "material from the early solar system" hypothesis) in the early solar system because they were so massive. The other planets might not have had enough gravity to attract this material.
Wow, these edits are out of control. I'll end them sometime. Anyway, you could probably test the moon-in-Roche-lobe theory and the early-solar-system-debris theory by analyzing the ring content and looking for similarities among the material in the ring structure.