We present a pedagogical account of the Lee-Yang theory of equilibrium phase transitions and review recent advances in applying this theory to nonequilibrium systems. Through both general considerations and explicit studies of specific models, we show that the Lee-Yang approach can be used to locate and classify phase transitions in nonequilibrium steady states.