Plants depend on the process of photosynthesis to make sugars and the process of cellular respiration to burn sugars. How could these two complex processes evolve in the same organism.
It seems more likely that cellular respiration (or a form of it) evolved first. But then the question is “what did they eat?”.
Well, you can start with this wikipedia link on the evolution of metabolism. Briefly, we don’t really know, the earliest common ancestor, presumably some sort of proto-bacteria, already had many of these pathways in place.
The Earth was a very different place back then, living things may have survived for a very long time as autotrophs, breaking down pre-existing complex molecules.
Bacteria kinds of things came first. These evolved into single celled organisms, which then evolved into multi-cell organisms. All of these single cell and multi-celled organisms evolved along with each other. Some couldn’t exist until others came along that they could feed on and that sort of thing. So, instead of a “which came first” kind of thing they all kind of evolved together out of simple organisms. Some of the early multi-cell organisms evolved into things like algae.
There’s no real clear dividing line between the bacteria-like organisms and plants. At some point, some of the bacteria-ish kinds of things started to develop plant-like characteristics which later became even more algae and plant-like. Things really diversified during the “Cambrian Explosion” somewhere around 530 to 550 million years ago.
As for “what did they eat?”, they were chemotrophs, that is, they used chemical energy sources from the environment rather than sunlight.
Actually, there’s a huge dividing line between bacterial-type organisms and true plants. Bacteria, and other simple organisms called archaea (known collectively as procaryotes), have a much simpler cellular structure and a different biochemistry than other single-celled organisms (including protozoa and various kinds of algae) or multicellular organisms (known collectively as eucaryotes).
Photosynthesis first developed in bacteria, in organisms now called cyanobacteria (they were formerly called blue-green algae, but they are not related to other algae). The evolution of photosynthesis predates the Cambrian explosion by about 3 billion years.
It is believed that the photosynthetic organs of eucaryotic algae and multicellular plants, the chloroplasts, originated as symbiotic bacteria. Multicellular plants are believed to be derived from green algae.
It’s likely that proto-plants were amoeba-like cells that engulfed smaller cells, digested them, and absorbed their molecules. Some proto-plant, munching on blue-green algae, failed to properly digest its dinner. Thus the chloroplast.