How many times did photosynthesis evolve?
The emergence of photosynthesis has occurred rather independently in multiple organisms. One way of looking at this is to look at the taxonomic distribution of photosynthesis reaction centers, which points to 5-10 origins according to current data (mostly in bacteria). That number has some big error bars as we are talking about very deep, old branches of the tree of life.
There are other criteria that we could use- for example the evolution of carbon fixation. However, that includes also chemoautotrophy, and is thus a bit more expansive.
Note that by some definitions the acquisition of cyanobacteria in plants may not even represent an independent emergence of photosynthesis, as the cyanobacteria already did photosynthesis!
If your question is more narrowly &quot;how many times did photosynthesis evolve in eukaryotes&quot; (not bacteria or archaea), then you would also need to include animals that do photosynthesis in a way similar to (though I believe less efficiently than) plants. They seem to similarly use endocytosis to acquire photosynthetic machinery from photosynthetic cells that they eat.
Update
In response to comment from @shigeta, I'll add that the review that I link focuses on the reaction centers (RC) genes. They note that the RC genes probably had a single emergence, but that horizontal gene transfer is probably responsible for the current distribution of the organismal trait of photosynthesis:

Significant evidence indicates that the current distribution of photosynthesis in bacteria is the result of substantial amounts of horizontal gene transfer, which has shuffled the genetic information that codes for various parts of the photosynthetic apparatus, so that no one simple branching diagram can accurately represent the evolution of photosynthesis (Raymond et al., 2002).