Sugar is formed during the process of photosynthesis in green plants. The process occurs in the chloroplasts and consists of two steps. The first step is associated with photolysis of water molecule, the release of electrons, protons (H+), and molecular oxygen as a byproduct. Transport of electrons and protons through the membrane results in the formation of ATP and NADPH that are used in the further step. The second stage of photosynthesis does not require light and is associated with the fixation of carbon dioxide with the formation of glycerol-3-phosphate that is further converted into glucose - the main monosaccharide used for the synthesis of other sugars. The dark phase of photosynthesis is called the Calvin cycle.