Context. The ionization of hydrogen in the solar chromosphere and transition region does not obey LTE or instantaneous statistical equilibrium because the timescale is long compared with important hydrodynamical timescales, especially of magneto-acoustic shocks. Since the pressure, temperature, and electron density depend sensitively on hydrogen ionization, numerical simulation of the solar atmosphere requires non-equilibrium treatment of all pertinent hydrogen transitions. The same holds for any diagnostic application employing hydrogen lines. Aims. To demonstrate the importance and to quantify the effects of non-equilibrium hydrogen ionization, both on the dynamical structure of the solar atmosphere and on hydrogen line formation, in particular Hα. Methods. We implement an algorithm to compute non-equilibrium hydrogen ionization and its coupling into the MHD equations within an existing radiation MHD code, and perform a two-dimensional simulation of the solar atmosphere from the convection zone to the corona. Results. Analysis of the simulation results and comparison to a companion simulation assuming LTE shows that: a) non-equilibrium computation delivers much smaller variations of the chromospheric hydrogen ionization than for LTE. The ionization is smaller within shocks but subsequently remains high in the cool intershock phases. As a result, the chromospheric temperature variations are much larger than for LTE because in non-equilibrium, hydrogen ionization is a less effective internal energy buffer. The actual shock temperatures are therefore higher and the intershock temperatures lower. b) The chromospheric populations of the hydrogen n = 2 level, which governs the opacity of Hα, are coupled to the ion populations. They are set by the high temperature in shocks and subsequently remain high in the cool intershock phases. c) The temperature structure and the hydrogen level populations differ much between the chromosphere above photospheric magnetic elements and above quiet internetwork. d) The hydrogen n = 2 population and column density are persistently high in dynamic fibrils, suggesting that these obtain their visibility from being optically thick in Hα also at low temperature.