They are rather expensive to build and put into space. They need to always be pointed at the Sun, which means they aren't useful when blocked by planets or other objects . They become significantly less useful the farther the satellite gets from the Sun, which generally means solar-powered missions can't travel much further than the orbit of Mars. Radioisotope thermoelectric generators are also reliable and consistent. They tend to be very expensive to build, and public opposition to their use is strong because people fear they might leak radioactive materials during a launch failure.
Fuel cells are much like batteries only they have a longer lifespan and can be refueled.
These are already in use in the Space Shuttle, and are quite useful in other near-Earth missions. However, for long flights they need lots of fuel.