Photosynthesis produces oxygen and glucose mainly. The oxygen gets released into the air, because oxygen to plants is like carbon dioxide to us. It doesnt harm them, but they cant use it. The glucose ends up either being used by the plant or stored somewhere within the plant to be used later.