This thesis reveals the utility of pursuing a statistical physics approach in the description of wave interactions in multimode optical systems. To that end, the appropriate Hamiltonian models are derived and their limits of applicability are discussed. The versatility of the framework allows the characterization of ordered and disordered lasers in open and closed cavities in a unified scheme, from standard mode-locking to random lasers. With the use of replica method and Monte Carlo simulations, the models are categorized on the basis of universal properties, and nontrivial predictions of experimental relevance are obtained. In particular, the approach makes it possible to nonperturbatively treat the interplay between disorder and nonlinearity and to envisage novel and fascinating physical phenomena such as glassy random lasers, providing a novel way to experimentally investigate replica symmetry breaking.