We present a generalized hydrogen model for the binding energies (EB) and radii of excitons in two-dimensional (2D) materials that sheds light on the fundamental differences between excitons in two and three dimensions. In contrast to the well-known hydrogen model of three-dimensional (3D) excitons, the description of 2D excitons is complicated by the fact that the screening cannot be assumed to be local. We show that one can consistently define an effective 2D dielectric constant by averaging the screening over the extend of the exciton. For an ideal 2D semiconductor this leads to a simple expression for EB that only depends on the excitonic mass and the 2D polarizability α. The model is shown to produce accurate results for 51 transition metal dichalcogenides. Remarkably, over a wide range of polarizabilities the binding energy becomes independent of the mass and we obtain E2DB≈3/(4πα), which explains the recently observed linear scaling of exciton binding energies with band gap. It is also shown that the model accurately reproduces the nonhydrogenic Rydberg series in WS2 and can account for screening from the environment.