The answer would be: light
The chemical reaction for photosynthesis are:
6CO2 + 6H2O + light energy = C6H12O6 + 6O2
Photosynthesis is an anabolic reaction that creates a bigger molecule. From the equation, it is clear that the light energy used in photosynthesize to create the glucose. Cellular respiration is used to create energy from glucose. Photosynthesis doesn't use ATP or electromagnetism.