A suggested ancestor of cyanobacteria consumed manganese. Why not magnesium?
There is no conclusive proof of why those organisms chose Mn over Mg (for obvious reasons). I'll just give an opinion on how Mn could be beneficial over Mg.

Even in the photosynthetic organisms present today, $Mn^{2+}$ is the ion used for oxidation of water while $Mg^{2+}$ is used to just get electrons by input of photons (from Kirschvink, 2015, if you're talking about this). When electron is removed from $Mg^{2+}$ (from 3s orbital), the formed $Mg^{3+}$ quickly oxidizes $Mn$ in the oxygen evolving complex (see this answer for more details). This suggests that $Mg^{3+}$ is much more unstable than $Mn^{3+}$, maybe too unstable for enzymes to use it to catalytically oxidize water.

Another point could be energy requirement. The third ionization enthalpy of magnesium ($ Mg^{2+} \rightarrow Mg^{3+} + e^-$) is 7732.7 kJ/mol. On the other hand, the third ionization enthalpy of manganese ($Mn^{2+} \rightarrow Mn^{3+} + e^-$) is only 3248 kJ/mol (which is still higher than other elements nearby it in periodic table, but thats another point). Now, though this energy is available today via sunlight for magnesium, it was most probably too large an energy input (keeping in mind the environmental conditions, like low sunlight due to excess sulfur dioxide in atmosphere, Kirschvink, 2015). Thus, manganese may have proved to be more beneficial than magnesium. As time passed, slowly there would have been enough energy available to oxidize magnesium, so it (sort of) took over manganese in the race.

Again, this is just a speculation. The real reason can remain elusive for a long time (until very strong, conclusive evidences are found).