The cyanobacterial phytochrome Cph2 is a light-dependent diguanylate cyclase of the cyanobacterium Synechocystis 6803. Under blue light, Cph2-dependent increase in the cellular c-di-GMP concentration leads to inhibition of surface motility and enhanced flocculation of cells in liquid culture. However, the targets of second messenger signalling in this cyanobacterium and its mechanism of action remained unclear. Here, we determined the cellular concentrations of cAMP and c-di-GMP in wild-type and Δcph2 cells after exposure to blue and green light. Inactivation of cph2 completely abolished the blue-light dependent increase in c-di-GMP content. Therefore, a microarray analysis with blue-light grown wild-type and Δcph2 mutant cells was used to identify c-di-GMP dependent alterations in transcript accumulation. The increase in the c-di-GMP content alters expression of genes encoding putative cell appendages, minor pilins and components of chemotaxis systems. The mRNA encoding the minor pilins pilA5-pilA6 was negatively affected by high c-di-GMP content under blue light, whereas the minor pilin encoding operon pilA9-slr2019 accumulates under these conditions, suggesting opposing functions of the respective gene sets. Artificial overproduction of c-di-GMP leads to similar changes in minor pilin gene expression and supports previous findings that c-di-GMP is important for flocculation via the function of minor pilins. Mutational and gene expression analysis further suggest that SyCRP2, a CRP-like transcription factor, is involved in regulation of minor pilin and putative chaperone usher pili gene expression.