Behavioral circadian rhythms are controlled by a neuronal circuit consisting of diverse neuronal subgroups. To understand the molecular mechanisms underlying the roles of neuronal subgroups within the Drosophila circadian circuit, we used cell-type specific gene-expression profiling and identified a large number of genes specifically expressed in all clock neurons or in two important subgroups. Moreover, we identified and characterized two circadian genes, which are expressed specifically in subsets of clock cells and affect different aspects of rhythms. The transcription factor Fer2 is expressed in ventral lateral neurons; it is required for the specification of lateral neurons and therefore their ability to drive locomotor rhythms. The Drosophila melanogaster homolog of the vertebrate circadian gene nocturnin is expressed in a subset of dorsal neurons and mediates the circadian light response. The approach should also enable the molecular dissection of many different Drosophila neuronal circuits.