Natural competence requires a contractile pilus system. Here, we provide evidence that the pilus biogenesis and natural competence in cyanobacteria are regulated by the second messenger c-di-AMP. Furthermore, we show that the ComFB signaling protein is a novel c-di-AMP-receptor protein, widespread in bacterial phyla, and required for DNA uptake.