We derive electronic structure models for weakly interacting bilayers such as graphene-graphene and graphene-hexagonal boron nitride, based on density functional theory calculations followed by Wannier transformation of electronic states. These transferable interlayer coupling models can be applied to investigate the physics of bilayers with arbitrary translations and twists. The functional form, in addition to the dependence on the distance, includes the angular dependence that results from higher angular momentum components in the Wannier p(z) orbitals. We demonstrate the capabilities of the method by applying it to a rotated graphene bilayer, which produces the analytically predicted renormalization of the Fermi velocity, Van Hove singularities in the density of states, and moire pattern of the electronic localization at small twist angles. We further extend the theory to obtain the effective couplings by integrating out neighboring layers. This approach is instrumental for the design of van der Walls heterostructures with desirable electronic features and transport properties and for the derivation of low-energy theories for graphene stacks, including proximity effects from other layers.