We present a theoretical study of the second-harmonic generation from pairs of two-level atoms in solids. The density-matrix formalism is used to obtain the nonlinear polarization governing the process. The second-harmonic polarization depends on the laser frequency, the interaction potential between the atoms, and the laser intensity. The signal line shape may exhibit power broadening and shift of resonances.