The production of monomer compounds for synthesizing plastics has to date been largely restricted to the petroleum-based chemical industry and sugar-based microbial fermentation, limiting its sustainability and economic feasibility. Cyanobacteria have, however, become attractive microbial factories to produce renewable fuels and chemicals directly from sunlight and CO2. To explore the feasibility of photosynthetic production of (S)- and (R)-3-hydroxybutyrate (3HB), building-block monomers for synthesizing the biodegradable plastics polyhydroxyalkanoates and precursors to fine chemicals, synthetic metabolic pathways have been constructed, characterized and optimized in the cyanobacterium Synechocystis sp. PCC 6803 (hereafter Synechocystis 6803). Both types of 3HB molecules were produced and readily secreted from Synechocystis cells without over-expression of transporters. Additional inactivation of the competing PHB biosynthesis pathway further promoted the 3HB production. Analysis of the intracellular acetyl-CoA and anion concentrations in the culture media indicated that the phosphate consumption during the photoautotrophic growth and the concomitant elevated acetyl-CoA pool acted as a key driving force for 3HB biosynthesis in Synechocystis. Fine-tuning of the gene expression levels via strategies, including tuning gene copy numbers, promoter engineering and ribosome binding site optimization, proved critical to mitigating metabolic bottlenecks and thus improving the 3HB production. One of the engineered Synechocystis strains, namely R168, was able to produce (R)-3HB to a cumulative titer of ~1600 mg/L, with a peak daily productivity of ~200 mg/L, using light and CO2 as the sole energy and carbon sources, respectively. Additionally, in order to establish a high-efficiency transformation protocol in cyanobacterium Synechocystis 6803, methyltransferase-encoding genes were cloned and expressed to pre-methylate the exogenous DNA before Synechocystis transformation. Eventually, the transformation efficiency was increased by two orders of magnitude in Synechocystis. This research has demonstrated the use of cyanobacteria as cell factories to produce 3HB directly from light and CO2, and developed new synthetic biology tools for cyanobacteria.