I don't believe that a hydrogen economy depends on a carbon economy at all.
God is a spirit. A spirit is as much matter as oxygen or hydrogen.
We're not just any star stuff, most of which is humdrum hydrogen and listless helium. Our bodies include fancier ingredients like carbon, oxygen, nitrogen, phosphorous, and a few other herbs and spices.
Hydrogen peroxide-based bombs were used in the London bombings in 2005; in al Qaeda's foiled plot to attack subways in New York City in 2009 and also in the ISIS-directed Paris attacks in 2015 and the ISIS-directed attacks in Brussels a year later.
The Swedish Academy of Sciences has seen fit, by awarding the Nobel Prize, to honour the method of producing ammonia from nitrogen and hydrogen.
If we had a hydrogen economy worldwide, every nation on earth could create its own energy source to support its economy, and the threat of war over diminishing resources would just evaporate.
Second point is no one here could predict or know that Israel was involved or started producing the hydrogen bomb - the most advanced and powerful atomic bomb that can kill millions of people.
With sufficient water on the Moon, solar energy can be used to split the water into hydrogen and oxygen. The oxygen is, of course, critical for humans to breathe and the water important for us to drink.
Gaseous nitrogen combines with gaseous hydrogen in simple quantitative proportions to produce gaseous ammonia.