We do not really know. We think it has something to do with how big the planet is since only the very large planets Jupiter, Saturn, Uranus and Neptune have them. Also, it could have something to do with how close to the Sun the planets are since the Sun's gravity could possibly make these rings unstable, especially if they are orbiting small planets like Mercury, Venus Earth and Mars which do not have very strong gravitational fields.