Hydrogen is already used as a fuel in some types of cars and buses. These use a fuel cell to react the hydrogen to form water and liberate energy. However, fuel cells are very expensive and a fuel cell car costs around £60’000.
Hydrogen is a liquid only when the temperature is below -253 degrees celsius. So in fuel cell cars the hydrogen is instead stored as a compressed gas. The hydrogen contains three times as much energy by mass as petrol. But it isn’t very dense and so the fuel tanks on hydrogen vehicles have to be very big!
The other question is where to get the hydrogen. It takes a lot of energy to get hydrogen gas. One idea is water splitting but we haven’t found an efficient way to do this on a big scale.
At the moment it almost certainly looks like battery powered cars will become more widely used than fuel cell cars.