Adaptive developmental plasticity is a common phenomenon across diverse organisms and allows a single genotype to express multiple phenotypes in response to environmental signals. Developmental plasticity is thus thought to reflect a key adaptation to cope with heterogenous habitats. Adaptive plasticity often relies on highly regulated processes in which organisms sense environmental cues predictive of unfavourable environments. The integration of such cues may involve sophisticated neuro-endocrine signaling pathways to generate subtle or complete developmental shifts. A striking example of adaptive plasticity is found in the nematode C. elegans, which can undergo two different developmental trajectories depending on the environment. In favourable conditions, C. elegans develops through reproductive growth to become an adult in three days at 20 °C. In contrast, in unfavourable conditions (high population density, food scarcity, elevated temperature) larvae can adopt an alternative developmental stage, called dauer. dauer larvae are highly stress-resistant and exhibit specific anatomical, metabolic and behavioural features that allow them to survive and disperse. In C. elegans, the sensation of environmental cues is mediated by amphid ciliated sensory neurons by means of G-coupled protein receptors. In favourable environments, the perception of pro-reproductive cues, such as food and the absence of pro-dauer cues, upregulates insulin and TGF-β signaling in the nervous system. In unfavourable conditions, pro-dauer cues lead to the downregulation of insulin and TGF-β signaling. In favourable conditions, TGF-β and insulin act in parallel to promote synthesis of dafachronic acid (DA) in steroidogenic tissues. Synthetized DA binds to the DAF-12 nuclear receptor throughout the whole body. DA-bound DAF-12 positively regulates genes of reproductive development in all C. elegans tissues. In poor conditions, the inhibition of insulin and TGF-β signaling prevents DA synthesis, thus the unliganded DAF-12 and co-repressor DIN-1 repress genes of reproductive development and promote dauer formation. Wild C. elegans have often been isolated as dauer larvae suggesting that dauer formation is very common in nature. Natural populations of C. elegans have colonized a great variety of habitats across the planet, which may differ substantially in environmental conditions. Consistent with divergent adaptation to distinct ecological niches, wild isolates of C. elegans and other nematode species isolated from different locations show extensive variation in dauer induction. Quantitative genetic and population-genomic approaches have identified many quantitative trait loci (QTL) associated with differences in dauer induction as well as a few underlying causative molecular variants. In this review, we summarize how C. elegans dauer formation is genetically regulated and how this trait evolves- both within and between species.