As electrons are passed along, energy is released, which is used to pump protons (active transport) across the thylakoid membrane into the thylakoid space.
Protons diffuse down the concentration gradient via facilitated diffusion through channels associated with ATP Synthase enzymes, causing ADP and inorganic phosphate to form ATP.