Photosynthesis is a process by which plants and other photoautotrophic organisms can synthesize carbohydrates (glucose) and oxygen using carbon dioxide from the atmosphere through stomata, light energy from the sun, and water. It takes place in the middle layer, mesophyll of the leaves (like in the palisade mesophyll cells). These cells consist of chloroplasts which are the main site of photosynthesis. As the process of photosynthesis is divided into two stages, light dependent and light independent, they occur in different parts of the chloroplasts.
The light dependent stage involves the capturing of light energy by chlorophyll pigments that are arranged in two photosystems (PSI and PSII) which are found in the thylakoid. Mainly red and blue wavelengths of the visible spectrum are absorbed, reflecting green wavelength which makes the plants look green. Many thylakoids are stacked together to form a granum which is then connected by lamellae. The light energy is used to excite the electrons in the photosystems which then pass along the electron transport chain in the thylakoid membrane. Then, this light energy is converted into chemical energy in the form of NADPH and ATP. Also, the photolysis of water happens that releases oxygen.
Then, the light independent stage happens outside the thylakoid membrane which is the stroma of the chloroplast that consists of many enzymes. The newly formed NADPH and ATP enter the stroma along with the carbon dioxide that diffuses in the plant through stomata. The carbon fixation happens in the Calvin Cycle that produces glyceraldehyde-3-phosphate (a 3-carbon sugar) which is further used to make different sugars like glucose, starch and cellulose.