The brain is composed of many kinds of cells, which differ from one another in molecular composition, shape, physiology, and pattern of connectivity. In order to understand how this diversity of cells works together as a circuit to implement the computations that generate behavior, and how these computations go awry in states associated with neurological and psychiatric disorders, it is important to be able to assess experimentally the causal role that a given kind of cell plays in the emergent dynamics of the circuit in which it is embedded. Such causal assessments cannot rely solely on observational experimental methodologies, but require the ability to perturb the electrical activity of a defined set of cells in a temporally precise way, as well as the ability to observe the impact of such a perturbation on electrical activity in the rest of the circuit and on behavior. My colleagues and I have developed a suite of genetically encoded molecular tools that, when expressed in defined sets of cells in the brain, enable them to be electrically activated or silenced in a temporally precise fashion, using pulses of light.