Photosynthesis is a process that shows how structure and function unite as one in biology. We can first think about the structure at the level of the plant itself, and how the location of photosynthesis is important for its function. The plant optimizes where it conducts photosynthesis; that is, photosynthesis does not occur in every cell in every plant. Chloroplasts are mostly localized in the leaves, primarily in a special type of cell called a mesophyll cell. In a special type of plant called C4 plants, the light-dependent and light-independent cells are separated, with the light-dependent reactions occurring in the mesophyll cells, and the light-independent reactions occurring in the bundle sheath cells. This spatial separation of photosynthesis decreases the amount of photorespiration that occurs because it limits the exposure of these cells to O2.
On a deeper level, we can also think about where photosynthesis is localized within the cell: the chloroplast. During the light-dependent reactions, the pigments in Photosystems I and II absorb photons and transfer that energy through the electron transport chain. The localization of these reaction centers in the thylakoid membrane creates an environment well suited for easy energy transfer. Each carrier molecule is nearby, which makes energy transfer more efficient. Structure and function working together. Isn't that sweet?
However, separation is also critical for the light reactions to occur. Protons move from the lumen of thylakoid in the chloroplast to the stroma in an attempt to reach a proton concentration equilibrium. This gradient is critical for bringing the protons together with the electrons from the electron transport chain to then make ATP and NADPH from ADP and NADP+.
ATP and NADPH are then conveniently located in the stroma of the chloroplast, which is where these energy powerhouses are needed to generate carbohydrates during the light-independent reactions. The localization of the light-independent reactions in the chloroplast is important for another reason as well. Many of the enzymes used in the Calvin cycle are also used in other cellular biochemical reactions, and the localization of these enzymes in the chloroplast facilitates their use in the Calvin cycle.
In all of this, the ATP and NADPH generated during photosynthesis rarely make it out of the chloroplast. That has got to be a pretty boring existence for them. Reaction after reaction? Give them a break! But no, these energy reserves remain almost exclusively in the chloroplast, fueling the production of carbohydrates. The plant then sustains life by breaking down these carbohydrates and generating ATP and NADPH again outside of the chloroplast.