Metal–organic frameworks (MOFs), with their crystalline nanoporous three-dimensional structures, have emerged as unique multifunctional materials that combine high porosity with catalytic, photophysical, or other properties to reveal new fundamental science and applications. Because MOFs are composed of organic molecules linking metal centers in ways that are not usually conducive to the formation of free-charge carriers or low-energy charge-transport pathways, they are typically insulators. Accordingly, applications so far have harnessed the unique structural properties and porosity of MOFs, which depend only to a small extent on the ability to manipulate their electronic structure. An exciting new area has emerged due to the recent demonstration of MOFs with controlled electronic and optical properties, which is enabling new fundamental science and opens up the possibility of applications in electronics and photonics. This article presents an overview of the fundamental science issues related to controlling electronic and optical properties of MOFs, and how research groups worldwide have been exploring such properties for electronics, thermoelectrics, photophysics, and charge storage.