What circumstance would a radioisotope thermoelectric generator is better to use than solar cells in space probes and rovers?
Solar power becomes inefficient when you go further out in the solar system: the solar panels you'd need to power a probe become too large to be workable. All of the outer planets missions used RTGs until Juno.
If you use solar power to run a lander or rover, you'll need to add batteries for nighttime operation. Even with batteries, operations are often limited because the batteries have to be used to run heaters as well as the lander/rover's systems.
With solar panels, the lander/rover's operation becomes dependent on the planet's weather. Spirit and Opportunity spent Martian winters standing still or moving only briefly, because the short days and low solar angles meant the panels didn't supply as much power as was needed for full operations.