Thylakoids are membrane-bound structures within chloroplasts that play a crucial role in photosynthesis. They contain chlorophyll and other pigments that capture light energy, which is then used to convert carbon dioxide and water into glucose and oxygen during the light-dependent reactions. The thylakoid membrane also houses the electron transport chain, which generates ATP and NADPH, essential energy carriers for the subsequent light-independent reactions (Calvin cycle).