Statistical mechanics models are ubiquitous at the interface of probability theory, information theory, and inference problems in high dimensions. To develop a refined understanding of such models, one often needs to study not only typical fluctuation theory but also the realm of atypical events. In this talk, we will focus on sparse networks and polymer models on lattices. In particular we will consider the rare events that a sparse random network has an atypical number of certain local structures, and that a polymer in random media has atypical weight. The random geometry associated with typical instances of these rare events is an important topic of inquiry: this geometry can involve merely local structures, or more global ones. We will discuss recent solutions to certain longstanding questions and connections to stochastic block models, exponential random graphs, eigenvalues of random matrices, and fundamental growth models.