For photosynthesis, ATP helps to provide energy needed for the carbohydrate synthesis in the Calvin/Benson/Bassham Cycle.
And in cellular respiration, they create 36 ATP, that is broken up into three different parts. First, is that they come from glycolysis, which is the first step in breaking down glucose to extract energy for cellular metabolism. Next comes the Krebs Cycle, which oxidizes the pyruvate formed during the glycolytic breakdown of glucose into Carbon Dioxide. Finally, we have the Electron Transport Chain, where a series of complexes transfer electrons from a redox reaction which happens during the aerobic respiration.