There has been a long time from the first photosynthesis until the appearance of cyanobacteria, which can oxidize water.
The first phototrophs have been able to oxidize only easier to oxidize substances, at first sulfur, then iron(II) ions, and eventually also manganese ions. The last of these, the oxidation of manganese ions, has evolved into the oxidation of water, which produces free dioxygen. The immediate ancestors of cyanobacteria had 2 different light capturing systems, presumably because one was specialized for oxidizing sulfur and the other was specialized for oxidizing manganese. After the development of the water-oxidizing capability, the 2 photo-systems have become connected in series in the modern oxygenic phototrophs, to accommodate a wider range in energy levels between that corresponding to the oxidation of the oxygen in water and that corresponding to the reducing of carbon into organic substances (and also to the reducing of nitrogen and sulfur).
Cyanobacteria have appeared only about half time from the appearance of life on Earth until today. They may have appeared only after up to a couple of billion years after the appearance of life.
Moreover, some of the signs that are considered as the earliest evidence for the activity of cyanobacteria are inconclusive, because deposits of oxidized iron can be produced not only by the appearance of free oxygen in the atmosphere, but also by direct oxidation of iron(II) ions by bacteria that are unable to produce free oxygen.
Another interesting thing is that it seems that cyanobacteria have appeared on the continents, not in the ocean, and they have invaded oceans only later.
In fresh water, the ability to oxidize water would have been critical, because fresh water did not contain abundant sulfide, iron(II) and manganese(II) ions, like the ocean, which were good enough for the earlier phototrophs.