We present models of the coupled evolution of the gaseous and stellar content of galaxies using a hybrid N-body/hydrodynamics code , a Jeans mass criterion for the onset of star formation from gas , while incorporating for the first time the formation of H _ { 2 } out of HI gas as part of such a model . We do so by formulating a subgrid model for gas clouds that uses well-known cloud scaling relations and solves for the HI \leftrightarrow H _ { 2 } balance set by the H _ { 2 } formation on dust grains and its FUV-induced photodissociation by the temporally and spatially varying interstellar radiation field . This allows the seamless tracking of the evolution of the H _ { 2 } gas phase , its precursor Cold Neutral Medium ( CNM ) HI gas , simultaneously with the star formation . An important advantage of incorporating the molecular gas phase in numerical studies of galaxies is that the set of observational constraints becomes enlarged by the widespread availability of H _ { 2 } maps ( via its tracer molecule CO ) . We then apply our model to the description of the evolution of the gaseous and stellar content of a typical dwarf galaxy . Apart from their importance in galaxy evolution , their small size allows our simulations to track the thermal and dynamic evolution of gas as dense as n \sim 100 cm ^ { -3 } and as cold as T _ { k } \sim 40 K , where most of the HI \rightarrow H _ { 2 } transition takes place . We are thus able to identify the H _ { 2 } -rich regions of the interstellar medium and explore their relation to the ongoing star formation . Our most important findings are : a ) a significant dependence of the HI \rightarrow H _ { 2 } transition and the resultant H _ { 2 } gas mass on the ambient metallicity and the H _ { 2 } formation rate , b ) the important influence of the characteristic star formation timescale ( regulating the ambient FUV radiation field ) on the equilibrium H _ { 2 } gas mass and c ) the possibility of a diffuse H _ { 2 } gas phase existing well beyond the star-forming sites where the radiation field is low . We expect these results to be valid in other types of galaxies for which the dense and cool HI precursor and the resulting H _ { 2 } gas phases are currently inaccessible by high resolution numerical studies ( e.g . large spirals ) . Finally we implement and briefly explore a novel approach of using the ambient H _ { 2 } gas mass fraction as a criterion for the onset of star formation in such numerical studies .