Catalysis of the transfer of electrons between pyridine nucleotides (obligatory two-electron carriers) and hemes or (2Fe-2S) centers (obligatory one-electron carriers) in respiration, photosynthesis, and many oxygenase systems.