In both cases the volumetric density is still quite poor, cryogenic is about 70g/l, which is actually less than the weight of hydrogen chemically bound in a liter of gasoline.
There exists some concepts of storing hydrogen chemically bound, e.g. to hydrocarbons or metal hydrites which release the gas on high temperatures (100-200°C).
Even 48% of a no-string-attached gift is a gift.
I think hydrogen will play some role in the future, but it should really only be used where no other, more efficient technology is available. For trains a well established technology is available: Electric trains with overhead lines. Use that.
Waiting for this miracle, we have to store energy.