Gene expression originates from individual DNA molecules within living cells. Like many single-molecule processes, gene expression and regulation are stochastic, that is, sporadic in time. This leads to heterogeneity in the messenger-RNA and protein copy numbers in a population of cells with identical genomes. With advanced single-cell fluorescence microscopy, it is now possible to quantify transcriptomes and proteomes with single-molecule sensitivity. Dynamic processes such as transcription-factor binding, transcription and translation can be monitored in real time, providing quantitative descriptions of the central dogma of molecular biology and the demonstration that a stochastic single-molecule event can determine the phenotype of a cell.