Oxygen is a reactant of aerobic respiration, while being the product for photosynthesis
Photosynthesis makes the glucose that is used in cellular respiration to make ATP. The process of Photosynthesis requires the products of aerobic respiration which are carbon dioxide and water, while on the other hand aerobic respiration requires the products of photosynthesis which are glucose and oxygen. So in this way both are related to each other.