Heterogeneous interfaces are central to many energy-related applications in the nanoscale. From the first-principles electronic structure perspective, one of the outstanding problems is accurately and efficiently calculating how the frontier quasiparticle levels of one component are aligned in energy with those of another at the interface, i.e., the so-called interfacial band alignment or level alignment. The alignment or the energy offset of these frontier levels is phenomenologically associated with the charge-transfer barrier across the interface and therefore dictates the interfacial dynamics. Although many-body perturbation theory provides a formally rigorous framework for computing the interfacial quasiparticle electronic structure, it is often associated with a high computational cost and is limited by its perturbative nature. It is, therefore, of great interest to develop practical alternatives, preferably based on density functional theory (DFT), which is known for its balance between efficiency and accuracy. However, conventional developments of density functionals largely focus on total energies and thermodynamic properties, and the design of functionals aiming for interfacial electronic structure is only emerging recently. This Review is dedicated to a self-contained narrative of the interfacial electronic structure problem and the efforts of the DFT community in tackling it. Since interfaces are closely related to surfaces, we first discuss the key physics behind the surface and interface electronic structure, namely, the image potential and the gap renormalization. This is followed by a review of early examinations of the surface exchange-correlation hole and the exchange-correlation potential, which are central quantities in DFT. Finally, we survey two modern endeavors in functional development that focus on the interfacial electronic structure, namely, the dielectric-dependent hybrids and local hybrids.