Light is created when electrons orbiting an atom become energized to move into a higher orbit, and then drop down to a lower orbit, releasing a small amount of energy in the process. This energy is called a photon, which is the fundamental particle of light.
Electrons are negatively charged particles which orbit the nucleus of an atom. Each electron has a natural orbit, but if given extra energy, an electron can move into an orbit further away from the nucleus. The orbits of each atom are fixed, but an electron can move between them.
When an electron drops from a high energy orbit to a lower energy one, there is now an excess amount of energy. This energy can't just disappear, so it is emitted as a photon of light. The energy of the photon depends on the difference in energy between the two orbits of the electron.
An example of this type of light creation can be seen in neon signs. Electric currents provide energy to the electrons of neon atoms and move them into a higher orbit. When the electrons drop down again, light of a very specific frequency is emitted, giving neon lights their purple color.