Classical large deviation theory provides sharp asymptotics for probabilities of rare events involving linear statistics of independent random variables. A natural nonlinear extension arises in the study of Erdős-Rényi graphs, where one of the earliest and most tractable questions concerns large deviations of triangle counts. Over the past fifteen years, this direction has led to substantial progress and new methods. In this talk, I will describe some of these developments, focusing in particular on large deviations for subgraph counts in sparse Erdős-Rényi graphs and random regular graphs. Based on joint works with Riddhipratim Basu and Shaibal Karmakar.