The H-2 level population distribution of the rotational levels J = 5, 6 and 7 is analysed using Copernicus observations. The measured distribution is shown to be compatible with an H-2 rotational excitation mechanism based on either H-2 formation or collisions with hydrogen atoms; it is incompatible with UV pumping. The H-2 formation hypothesis is more plausible, because the collisional excitation mechanism requires physical conditions which are not consistent with other observations of diffuse clouds. If H-2 formation on grains is the source of the observed H-2 level population distribution, the newly created H-2 molecules are rotationally hot. Assuming that H-2 molecules have a narrow initial rotational energy distribution when they are formed, the evolution time of diffuse clouds from an initially atomic state is estimated for a number of observed diffuse clouds. These cloud ages are typically less than or similar to 10(6) yr. Chemical models for diffuse clouds are also strongly influenced by the assumption that H-2 formation rather than UV pumping is responsible for the H-2 excitation, because the UV field irradiating the clouds can in this case be much weaker than for previous models adopted. A chemical model for the zeta Oph cloud using the H-2 formation mechanism for reproducing the observed H-2 level population distribution matches the observations for all detected chemical species (except CH+) remarkably well. In particular, the calculated CO, CN and CS abundances match those observed, and a large fraction of cosmic carbon is assumed to be locked in dust.