One problem to solve is the temporary storage of the green energy produced from the sun and the wind.
There are different solutions, like using batteries, pumping water to an elevated lake, moving weights to the top of a tower....
Generating Hydrogen is another alternative.
However the whole process of converting electricity into gas, compressing the gas, and converting back the gas into electricity is not very efficient.
One argument to justify the use of Hydrogen, from Trevor Milton, Nikola CEO,
is that the Hydrogen will be generated from "Free" left over electricity from Green energy, Nuclear energy, burning trash... which would have been lost.
What do you think about this argument, considering that, well, the sun energy, wind energy, hydro energy from lakes or oceans... I believe are free.
Note: Methane is currently the principal way to produce the Hydrogen used for cars and trucks.
As you correctly note, producing H2 from electricity, and then electricity from the H2 is extremely inefficient. Meanwhile, as we all know, electric motors are very efficient. So storing energy by pumping water or by raising weights is vastly more efficient than using H2. And even batteries are far more efficient than e->H2->e.
As nwdiver points out, we should be using electrolysis to produce the H2 that we need for industrial uses, not as storage of excess solar. There is absolutely no excuse for burning any fossil fuel to produce electricity in sunny regions.