An important factor contributing to the phenomenal advances in surface science in the past three decades has been the development and applications of numerous high resolution spectroscopies to the electronic properties of surfaces and interfaces. Over the same period, equally impressive progress has been made in the theoretical front in understanding and predicting surface electronic structure. In this paper, the development of a first-principles quasiparticle approach to the electronic excitation energies in crystals and at surfaces is reviewed. The approach allows an accurate computation of the particle-like excitations (quasiparticle states) of the interacting electrons in real materials. It is the quasiparticle energies which essentially determine the spectral features measured in photoemission, optical, scanning tunneling, and various other spectroscopic experiments. Applications of this approach to the analysis of selected bulk and surface systems are presented. Significant self-energy corrections arising from many-electron effects to the excitation energies are found. Employing atomic positions from total energy minimization, the calculated excitation energies have been used to explain and predict the experimental spectra of a variety of systems.