During photosynthesis light energy from the sun causes carbon dioxide and water to be transformed into glucose (sugar) and oxygen.
Cellular respiration requires glucose and oxygen to make carbon dioxide and water. In the process, chemical energy (Specifically, it's adenosine triphosphate or ATP) is released.
So the photosynthesis provides glucose and oxygen, and the cellular respiration uses it to make carbon dioxide and water (waste products).
Let me know if you need further explanation.