Stochastic pulsing of gene expression can generate phenotypic diversity in a genetically identical population of cells, but it is unclear whether it has a role in the development of multicellular systems. Here, we show how stochastic pulsing of gene expression enables spatial patterns to form in a model multicellular system, Bacillus subtilis bacterial biofilms. We use quantitative microscopy and time-lapse imaging to observe pulses in the activity of the general stress response sigma factor σ B in individual cells during biofilm development. Both σ B and sporulation activity increase in a gradient, peaking at the top of the biofilm, even though σ B represses sporulation. As predicted by a simple mathematical model, increasing σ B expression shifts the peak of sporulation to the middle of the biofilm. Our results demonstrate how stochastic pulsing of gene expression can play a key role in pattern formation during biofilm development.