In the simplest systems in prokaryotes, photosynthesis is used just for the production of energy, and not for the building of any biological molecules. In these systems there is a process called cyclic photophosphorylation which just accomplishes the ADP to ATP process for immediate energy for these cells.
Photophosphorylation in ordinary plants is a much more ambitious undertaking. In the process called noncyclic photophosphorylation, a plant must accomplish the splitting of water, the conversion of ADP to ATP, and the provision of the reduced coenzyme NADPH to power the synthesis of energy storage molecules.
Moore, et al.