A theory of critical state and of the evolution of coordination number during quasi-static deformations of granular materials is developed, based on the interpretation of several discrete element simulations of plane granular assemblies with a range of interparticle friction from nearly frictionless to infinitely rough. The theory is based on the concept that shear deformations tend to destroy interparticle contacts and create locally unstable configurations that regain stability by forming new or restoring old interparticle contacts. The process is operating in such a way that in a dense state the rate of contact disintegration exceeds the rate of contact creation, while in the critical state both rates are equalized. In a loose state more contacts are created than disintegrated until rates are equalized. Interparticle friction is viewed as an essential element that affects stability of local configurations. This explains the pronounced dependence of critical coordination number on interparticle friction as observed in two-dimensional discrete element simulations. The derived differential equation for the evolution of coordination number in biaxial tests is shown to describe the results of the discrete element simulations remarkably well. The paper also presents analyses of simulation data to investigate a relationship between packing fraction of granular assemblies and coordination number. The data suggest that the packing fraction is affected by the anisotropy of contact orientations as well as by the coordination number. The latter is the primary variable. Limited data also suggest that critical state is characterized by both critical coordination number and by critical anisotropy induced by shear deformations.