A model Hamiltonian, based on LDA calculations, is introduced for describing the behavior of the electrons filling the dangling bonds of the Si(111)-(7 x 7) surface. Our analysis of this model shows that this surface has a metallic character at room temperature and exhibits a metal-insulator transition for a temperature between 120 and 180 K. These properties are associated with the localization of electrons on some elementary structures having either a dimer or a hexagonal ring geometry.