Obviously, as an energy carrier, you'd use batteries whenever possible. But there are many places where we'd need hydrogen, or fuels made with the help of hydrogen, to get the necessary energy density.
Hydrogen ferries and trains are in service, or being put into service, right now. If batteries was a viable, cheaper alternative in those specific cases, it would have been used. It's obviously not that hard to store. Norway has both battery and hydrogen ferries, what's used depends on the required range.
That said, a hydrogen gas station exploded near me, so yeah. There's definitely challenges, and it shouldn't be used where it doesn't make sense.