It has a higher energy density but not "very high".
Lithium-ion tops out around 2.4 MJ/L, LOH 8~10. Maybe one order of magnitude difference when you use less dense li-ion. Plus that energy density of LOH doesn't take in account the absolute hell that it is to keep stored. Fossil fuels are in the mid-30s by comparison.
What LOH does have compared to batteries and even fossil fuels is very high specific energy (energy per kg), it's about triple fossil fuels and a good 2 orders of magnitude better than li-ion. That's why it's been used a lot in rocketry, where mass is a much bigger concern than volume.