We discuss a general framework for the realization of a family of abelian lattice gauge theories, i.e., link models or gauge magnets, in optical lattices. We analyze the properties of these models that make them suitable to quantum simulations. Within this class, we study in detail the phases of a U(1)-invariant lattice gauge theory in 2+1 dimensions originally proposed by Orland. By using exact diagonalization, we extract the low-energy states for small lattices, up to 4x4. We confirm that the model has two phases, with the confined entangled one characterized by strings wrapping around the whole lattice. We explain how to study larger lattices by using either tensor network techniques or digital quantum simulations with Rydberg atoms loaded in optical lattices where we discuss in detail a protocol for the preparation of the ground state. We also comment on the relation between standard compact U(1) LGT and the model considered.