The influence of optical excitation on the formation of nalidixic acid dimers and excimers in aqueous media in the ground and excited states was studied. Quantum-chemical calculations of the total energy of monomers and dimers were performed. The spectral-luminescent characteristics of pairs of nlqH molecules were measured, and changes in charges on atoms in the ground and excited states were estimated.