In solar panels, is heat energy converted into electrical energy or is light energy converted into electrical energy?
Physics Stack Exchange is a question and answer site for active researchers, academics and students of physics. It only takes a minute to sign up.Sign up to join this community
A photovoltaic solar panel is effectively a giant diode i.e. it has a layer of $n$ doped silicon in contact with a layer of $p$ doped silicon with a PN junction between them.
When a photon hits the solar panel it can excite an electron from the valence band into the conduction band, and this produces a negatively charged electron in the conduction band and a positively charged hole in the valence band. At the PN junction the electron is attracted to the $n$ doped side and the hole is attracted to the $p$ doped site so the two charges separate, and that separation creates a potential difference. The end result is that absorption of light produces a voltage difference between the two sides of the cell.
If you're interested in the gory details Wikipedia has a nice article on the subject here.
Infra-red light, i.e. heat, also consists of photons but those photons do not have enough energy to excite an electron within the silicon. So a PV panel converts light to electricity not heat to electricity.