The answer is; Plants both produce and use oxygen for photosynthesis and cellular respiration, respectively.
Plants use the energy from the sun to split water molecules to H+ and O2-. The H+ is used to reduce carbon dioxide into glucose molecules. The oxygen is a byproduct that is evolved. However, the cellular respiration of plant cells is similar to that of other organisms on earth. They utilize oxygen to ‘burn’ glucose for energy.