To evaluate a fuel cell you weigh its strengths against its weaknesses for a particular use. The strengths are real. A hydrogen-oxygen fuel cell produces only water where it is used, so there is no carbon dioxide or soot. A fuel cell car can be refuelled in a few minutes, whereas a battery car takes hours to recharge. The cell has no moving parts and it is quiet.
The weaknesses matter too. Hydrogen is a flammable gas that takes up a lot of space when stored, so it must be compressed or cooled. There are few refuelling stations, and fuel cells can be expensive to build. Hydrogen also has to be made. It is often made from methane or by electrolysis of water, and both need energy. A fuel cell is only truly clean if the hydrogen is made using renewable electricity.
The best choice depends on the use. A spacecraft needs a light power source, and the water produced can be drunk, so a fuel cell suits it well. A phone needs a very small power source, and hydrogen would take up too much space, so a battery is better there.