Two-dimensional layered materials have been under the investigations since the exfoliation of single-layer graphene sheets. Over the years, more types of layered compounds are discovered or fabricated. The layered geometry also allows for more experimental manipulations to create heterostructure, which leads to unique electronic properties. For example, the twisted bilayer graphene can display unconventional correlated insulator and superconductivity when rotated at the magic angle. For further design and applications with these layered compounds, it is crucial to develop tools that can model and capture the electronic properties efficiently and accurately. In this talk, I will briefly discuss the application of Wannier functions to construct such mathematical models. The obtained ab initio tight-binding Hamiltonians are accurate and simple to use. We have employed these modeling to the layered heterostructure using twisted bilayer graphene as an example, and the kagome lattice. With these tight-binding models, we can further derive the effective low-energy theories and discuss the relevant topological properties associated with the low-energy manifold.