As the world strives to reduce its reliance on fossil fuels, materials innovations can help catalyze the switch to renewable energy and the engineering of energy-efficient devices. Powered by modern high-performance computers, s first-principles methods can provide an understanding of fundamental materials processes at the microscopic level and play an important role in the development of novel energy materials and devices. In this talk, I will present insights garnered from first-principles calculations for the study of the performance of optoelectronic devices for energy. I will discuss the loss by non-radiative recombination in nitride LED light bulbs, the internal reabsorption of light and loss in nitride green lasers and transparent conductors, and the phonon-assisted optical absorption that enables the operation of silicon solar cells.