Where do photons come from?
To understand where photons come from, let's take a closer look at the atom:

In the center of every atom is a tiny, dense nucleus. The nucleus contains two kinds of particles: neutrons, which have no charge, and positively charged protons. Negatively charged particles called electrons orbit around the nucleus in different layers, or orbitals. (Unlike this diagram, there is a vast space between the nucleus and the electron orbitals. In a gold atom, if the nucleus were one foot in diameter, then the outermost electron would be 3.3 miles away!)
These orbitals surrounding the nucleus have different levels of energy - the farther away each is from the nucleus, the more energy it has. But electrons can also jump between orbitals, a process that takes energy. If electrons jump to an outer orbital, they use energy. But if they jump to an inner orbital, they give up energy. This energy is released as a tiny packet of light energy, or a photon.
Einstein Sheds a Light on a Mystery
For centuries, scientists pondered the nature of light. Some thought it was made of particles, others thought it was a wave. In 1905, Albert Einstein shed some light on the matter. He helped put everybody's ideas together—and today scientists agree that light acts both as a wave AND a particle. These particles come in concentrated bundles of energy—photons. When photons of light hit a metal surface, electrons are sometimes emitted from the metal's atoms. Light also travels in waves. In fact, the energy of the emitted electrons depends on the wavelength of light that hits the metal. The shorter the wavelength, the more energy these emitted electrons have. This is called the photoelectric effect. In 1921, Einstein won the Nobel Prize for his explanation of the photoelectric effect.
Image Credits:
All Photos: courtesy of AMNH