Optical metasurfaces consist of 2D arrangements of scatterers, and they control the amplitude, phase, and polarization of an incidence field on demand. Optical metasurfaces are the cornerstone for a future generation of flat optical devices in a wide range of applications. The rapid advances in nanofabrication have made the versatile design and analysis of these ultra‐thin surfaces an ever‐growing necessity. However, a comprehensive theory to describe the optical response of periodic metasurfaces in closed‐form and analytical expressions has not been formulated, and prior attempts are frequently approximate. Here, a theory is developed that analytically links the properties of the scatterer, from which a metasurface is made, to its response via the lattice coupling matrix. The scatterers are represented by their polarizability or T matrix. Explicit expressions for the optical response up to octupolar order in both spherical and Cartesian coordinates are provided, for normal or oblique incidence. Several examples demonstrate that the proposed theoretical approach is a powerful tool for exploring the physics of metasurfaces and designing novel flat optics devices. Novel fully‐diffracting metagratings and particle‐independent polarization filters are proposed, and novel insights into bound states in the continuum, collective lattice resonances, and the response of Huygens’ metasurfaces under oblique incidence are provided.