Many materials can be modeled either as discrete systems or as continua, depending on the scale. At intermediate scales it is necessary to understand the transition from discrete to continuous models and variational methods have proved successful in this task, especially for systems, both stochastic and deterministic, that depend on lattice energies. This is the first systematic and unified presentation of research in the area over the last 20 years. The authors begin with a very general and flexible compactness and representation result, complemented by a thorough exploration of problems for ferromagnetic energies with applications ranging from optimal design to quasicrystals and percolation. This leads to a treatment of frustrated systems, and infinite-dimensional systems with diffuse interfaces. Each topic is presented with examples, proofs and applications. Written by leading experts, it is suitable as a graduate course text as well as being an invaluable reference for researchers.