Some photosynthetic bacteria such as Rhodopseudomonas can prepare carbohydrates. But during this type of food synthesis O2 does not evolved because in this case hydrogen donor is other than H2O. Algae (green and blue green) and all green plant cells prepare their food (carbohydrate) through photosynthesis.
Here, hydrogen ions are donated by water molecules by the process of photolysis of water i.e., O2 is released during this type of food synthesis.