In vitro models of the developing brain such as three-dimensional brain organoids offer an unprecedented opportunity to study aspects of human brain development and disease. However, the cells generated within organoids and the extent to which they recapitulate the regional complexity, cellular diversity and circuit functionality of the brain remain undefined. Here we analyse gene expression in over 80,000 individual cells isolated from 31 human brain organoids. We find that organoids can generate a broad diversity of cells, which are related to endogenous classes, including cells from the cerebral cortex and the retina. Organoids could be developed over extended periods (more than 9 months), allowing for the establishment of relatively mature features, including the formation of dendritic spines and spontaneously active neuronal networks. Finally, neuronal activity within organoids could be controlled using light stimulation of photosensitive cells, which may offer a way to probe the functionality of human neuronal circuits using physiological sensory stimuli.