The structure of bacterial populations is governed by the interplay of many physical and biological factors, ranging from properties of surrounding aqueous media and substrates to cell-cell communication and gene expression in individual cells. The biomechanical interactions arising from the growth and division of individual cells in confined environments are ubiquitous, yet little work has focused on this fundamental aspect of colony formation. We analyze the spatial organization of Escherichia coli growing in a microfluidic chemostat. We find that growth and expansion of a dense colony of cells leads to a dynamical transition from an isotropic disordered phase to a nematic phase characterized by orientational alignment of rod-like cells. We develop a continuum model of collective cell dynamics based on equations for local cell density, velocity, and the tensor order parameter. We use this model and discrete element simulations to elucidate the mechanism of cell ordering and quantify the relationship between the dynamics of cell proliferation and the spatial structure of the population.