Commercially available solar panels now routinely convert 20% of the energy contained in sunlight into electricity, a truly remarkable feat of science and engineering, considering that it is theoretically impossible for silicon-based solar cells to be more than 32% efficient. This upper bound, known as the Shockley-Queisser Limit, was first calculated by the eponymous scientists (who actually gave 30% as their original limit) in the Journal of Applied Physics in 1961  (see also updates by Rühle ).
Now, if we can answer why solar panels are thus limited, we can understand the essentials of photovoltaics (PV), which have their basis in the photoelectric effect, and p-n semiconductor junctions. While many have never heard of it, the photoelectric effect is of monumental importance, and when Albert Einstein received the 1921 Nobel Prize in physics, it was “for his services to Theoretical Physics, and especially for his discovery of the law of the photoelectric effect,” while p-n junctions lie at the foundations of modern electronics, including transistors and LEDs. Indeed, a solar cell is essentially an LED in reverse: Instead of an electric current generating light, light generates electric current!