The soil-dwelling bacterium Bacillus subtilis differentiates into distinct subpopulations of specialized cells that coexist within highly structured communities. The coordination and interplay between these cell types requires extensive extracellular communication driven mostly by sensing self-generated secreted signals. These extracellular signals activate a set of sensor kinases, which respond by phosphorylating three major regulatory proteins, Spo0A, DegU and ComA. Each phosphorylated regulator triggers a specific differentiation program while at the same time repressing other differentiation programs. This allows a cell to differentiate in response to a specific cue, even in the presence of other, possibly conflicting, signals. The sensor kinases involved respond to an eclectic group of extracellular signals, such as quorum-sensing molecules, natural products, temperature, pH or scarcity of nutrients. This article reviews the cascades of cell differentiation pathways that are triggered by sensing extracellular signals. We also present a tentative developmental model in which the diverse cell types sequentially differentiate to achieve the proper development of the bacterial community.