Photosynthesis has two main sets of reactions. Light-dependent reactions need light to work; and light-independent reactions, which do not need light to work.
Light energy from the sun is used to split water molecules (photolysis). The sunlight hits chloroplasts in the plant, causing an enzyme to break apart the water. Water, when broken, makes oxygen, hydrogen, and electrons in the pathway of Dolai's S-state diagrams.
Ref. Dolai, U (2017) "Chemical Scheme of Water -Splitting Process during Photosynthesis by the way of Experimental Analysis ". IOSR Journal of Pharmacy and Biological Sciences. 12(6): 65-67. doi:10.9790/3008-1206026567. ISSN 2319-7676.
Hydrogen, along with electrons energized by light, converts NADP into NADPH which is then used in the light-independent reactions. Oxygen diffuses out of the plant as a waste product of photosynthesis, and ATP is synthesized from ADP and inorganic phosphate. This all happens in the
grana of chloroplasts.
During this reaction, sugars are built up using carbon dioxide and the products of the light-dependent reactions (ATP and NADPH) and various other chemicals found in the plant in the Calvin Cycle. Therefore, the light-independent reaction cannot happen without the light-dependent reaction. Carbon dioxide diffuses into the plant and along with chemicals in the chloroplast, ATP, and NADPH, glucose is made and finally, transported around the plant by translocation.