Currently, a common solution is storing that excess energy in battery. Hydrogen, like batteries, stores energy. Although both will be necessary for the transition to a carbon-free society, hydrogen has considerable advantages when it comes to scalability.
Hydrogen is a green large-scale energy storage solution. Powering larger units such as trucks or buildings, is a cumbersome task for batteries alone. Through the use of fuel cells, hydrogen on the other hand, can power anything from cars to hotels to whole communities.