When photosynthetic organisms first developed, there was a lot more carbon dioxide in the environment for them to use (with the world so new and all...) and therefore they weren't particularly bothered about getting hold of it. However when the carbon dioxide levels dropped (along with a potential rise in temperature) they were suddenly in very real danger of suffocating. These were marine organisms, and there just isn't that much carbon dioxide in seawater. There's plenty of carbon floating around, certainly, but it's all in bicarbonate form (HCO3- rather than CO2) and Rubisco, the main enzyme involved in photosynthesis, doesn't know how to use bicarbonate, it relies exclusively on carbon dioxide.
Our lecturer called it the 'Ancient Mariner paradox'; the ocean is full of carbon, but the photosynthesis machinery just couldn't use it:
"Water, water, everywhere,
And all the boards did shrink;Water, water, everywhere,
Nor any drop to drink."
This left the little suffocating blobs with three options. They could stay remain tiny (as the picoplankton did) to minimise diffusion differences and therefore still survive dispite the low carbon dioxide levels. Or they could try to change the way Rubisco worked, but Rubisco has a rather compromised active site as it is, having to both distinguish between carbon dioxide and oxygen and trying to keep carbon dioxide processing levels high. Rubisco is often criticised as being an 'inefficient' enzyme, and compared to other enzymes it is, but with carbon dioxide levels at the level they are in the sea it's only ever working at half of its maximum speed. Carbon dioxide is the clear limiting factor.
So instead, these photosynthetic organisms started to develop ways to get carbon dioxide into the cell and concentrating it around the Rubisco. The main factor in this was the enzyme carbonic anhydrase, which converts bicarbonates back into carbon. However doing that inside the cell just leads to the carbon dioxide diffusing right back out again and therefore today almost all photosynthetic bacteria (and chloroplasts inside plants) contain a special internal compartment, a protein coat surrounding the Rubisco, and all the carefully hoarded carbon dioxide:
Figure above shows TEM of bacteria with carboxysomes pointed out by arrows. The scale bar on the bottom right is 100nm
Photosynthesising bacteria (apart from the picoplankton) contain a compartment called a carboxysome, which consists of a protein coat which contains carbonic anhydrase enzyme and Rubisco, allowing carbon dioxide to be produced right where it's most needed. The addition of a number of bicarbonate transporters on the outside of the cell allows bicarbonate to be brought into the cell, and the whole assembly is known as a Carbon Concentrating Mechanism, or CCM.
When these photosynthesising proto-bacteria were then picked up by free-moving proto-algae to become chloroplasts, they kept their CCMs. The CCM of eukaryotic chloroplasts is called a pyraniod, and can be seen in the picture below (from Dartmouth College) as the dark black blob in the upper left hand corner. The white things that it's surrounded by are starch grains. The big fuzzy blob below it is the cell nucleus, and the little grey membrane-filled circles are the mitochondria. The long black threads are either thylakoid membranes (inside the chloroplast) or endoplasmic reticulum:
The first algae would have been marine as well, and would have needed the CCMs in their chloroplasts in order to produce energy. Sea water tends to be alkaline, which means that the biocarbonate: carbon dioxide ration is insanely large. Gasses don't diffuse very well in water either, carbon dioxide takes about about 10 000 times longer to get anywhere in liquid compared to air.
In fact the best thing to do to get as much free carbon dioxide as possible is to leave the water altogether, and head out onto the land. But that is different story.
---
Tanaka S, Kerfeld CA, Sawaya MR, Cai F, Heinhorst S, Cannon GC, & Yeates TO (2008). Atomic-level models of the bacterial carboxysome shell. Science (New York, N.Y.), 319 (5866), 1083-6 PMID: 18292340