ATP synthesis in chloroplasts is very similar to that in mitochondria: Electron transport is coupled to the formation of a proton (H+) gradient across a membrane. The energy in this proton gradient is then used to power ATP synthesis.
Two types of processes that contribute to the formation of the proton gradient are:
processes that release H+ from compounds that contain hydrogen, and
processes that transport H+ across the thylakoid membrane.