The characterization of the atomic and molecular hydrogen content of high-redshift galaxies is a major observational challenge that will be addressed over the coming years with a new generation of radio telescopes. We investigate this important issue by considering the states of hydrogen across a range of structures within high-resolution cosmological hydrodynamical simulations. In addition, our simulations allow us to investigate the sensitivity of our results to numerical resolution and to sub-grid baryonic physics (especially feedback from supernovae and active galactic nuclei). We find that the most significant uncertainty in modelling the neutral hydrogen distribution arises from our need to model a self-shielding correction in moderate density regions. Future simulations incorporating radiative transfer schemes will be vital to improve on our empirical self-shielding threshold. Irrespective of the exact nature of the threshold, we find that while the atomic hydrogen mass function evolves only mildly from redshift two to zero, the molecular hydrogen mass function increases with increasing redshift, especially at the high-mass end. Interestingly, the weak evolution of the neutral hydrogen mass function is insensitive to the feedback scheme utilized, but the opposite is true for the molecular gas, which is more closely associated with the star formation in the simulations.