We report on a statistical approach to mode-locking transitions of nano-structured laser cavities characterized by an enhanced density of states. We show that the equations for the interacting modes can be mapped onto a statistical model exhibiting a first order thermodynamic transition, with the average mode-energy playing the role of inverse temperature. The transition corresponds to a phase-locking of modes. Extended modes lead to a mean-field like model, while in presence of localized modes, as due to a small disorder, the model has short range interactions. We show that simple scaling arguments lead to observable differences between transitions involving extended modes and those involving localized modes. We also show that the dynamics of the light modes can be exactly solved, predicting a jump in the relaxation time of the coherence functions at the transition. Finally, we link the thermodynamic transition to a topological singularity of the phase space, as previously reported for similar models.