Hydrogen can be burned as a fuel in cars in place of petrol. When hydrogen burns it reacts with oxygen and the only product is water: 2H2 + O2 → 2H2O. Hydrogen contains no carbon atoms, so burning it makes no carbon dioxide, carbon monoxide or soot. It also has no sulfur impurities, so it makes no sulfur dioxide. Petrol is a non-renewable fossil fuel, but hydrogen can be made from water by electrolysis. If the electricity comes from renewable sources, hydrogen is a very clean fuel.
There are disadvantages. Hydrogen is a gas at room temperature, so it takes up a large volume and is hard to store. It has to be compressed to a very high pressure or cooled until it is a liquid. Hydrogen is explosive when mixed with air, and there are very few refuelling stations for it. Most hydrogen today is made from natural gas, a fossil fuel, which uses energy and releases carbon dioxide.
When you evaluate, weigh up the clean exhaust against the problems of storage, safety, cost and how the hydrogen was made.