Ammonia has a higher energy density, at 12.7 MJ/L, than even liquid hydrogen, at 8.5 MJ/L. Liquid hydrogen has to be stored at cryogenic conditions of –253 °C, whereas ammonia can be stored at a much less energy-intensive –33 °C. And ammonia, though hazardous to handle, is much less flammable than hydrogen.
This doesn't even mention how elemental hydrogen weakens metals over time ("embrittlement"), which makes storage even more challenging. There are lots of other issues discussed at that link, and it's clear that NH3 will be more expensive than e.g. gasoline, at least until there is better solar power. Still, if hydrogen makes sense, ammonia makes sense.
[0] https://cen.acs.org/business/petrochemicals/ammonia-fuel-fut...