PSII is a transmembrane structure found in all chloroplasts. It splits water into electrons, protons and molecular oxygen. The electrons are transferred to plastoquinol, which carries them to a proton pump. The oxygen is released into the atmosphere.
The emergence of such an incredibly complex structure, a macromolecule that converts the energy of sunlight into chemical energy and thus potentially useful work with efficiencies that are impossible in ordinary experience, seems almost magical at first glance. Thus, it is of considerable interest that, in essence, the same structure is found in purple bacteria.