Metal–organic frameworks (MOFs) are porous ordered arrays of inorganic clusters connected by organic linkers. The compositional diversity of the metal and ligand, combined with varied connectivity, has yielded more than 20,000 unique structures. Electronic structure theory can provide deep insights into the fundamental chemistry and physics of these hybrid compounds and identify avenues for the design of new multifunctional materials. In this article, a number of recent advances in materials modeling of MOFs are reviewed. We present the methodology for predicting the absolute band energies (ionization potentials) of porous solids as compared to those of standard semiconductors and electrical contacts. We discuss means of controlling the optical bandgaps by chemical modification of the organic and inorganic building blocks. Finally, we outline the principles for achieving electroactive MOFs and the key challenges to be addressed.