A process, occurring as part of photosynthesis, in which light provides the energy for a series of electron carriers to operate together to transfer electrons and generate a transmembrane electrochemical gradient.