What did cyanobacteria gain from photosynthesis?
But cyanobacteria do not seem to use polysaccharides in the same way as plant cells do (building materials, for example)



The Calvin-Benson cycle produces glucose which is the starting
material for a lot of biosynthetic pathways including that of the
nucleotides (ribose from the pentose-phosphate pathway). Glycolytic intermediates are also involved in the synthesis of amino
acid, isoprenoids etc. Essentially all the carbon that cyanobacteria
contains comes from fixation of carbon (from CO2) via
photosynthesis.
Cyanobacteria also store starch as an energy reserve (Suzuki et
al., 2013). They also produce other polysaccharides (Phillipis
and Vincenzini, 1998). Moreover, the peptidoglycan cell wall has a "glycan" part which is a glucose derivative (a polysaccharide).
Moreover, cyanobacteria cannot produce ATP via the photosynthetic
electron transport chain in the dark and ATP in dark conditions
is generated (though significantly less) via substrate level phosphorylation in glycolysis.