Where does the energy of a light bulb come from?
Is it from the coil of wire, magnet in the generator, mechanical input to the generator or plug where the generator is connected to the wall?
Well, that really depends on how far you want to take it. The photons that leave the light bulb are created to 'leak off' the abundant energy that is available in the highly energetic atoms in the coil of wire. The energy in these atoms (usually tungsten) takes on the form of heat. The coil of wire got so hot, because the electrons racing through it have a hard time getting through the tungsten. This means they lose energy, which the tungsten atoms absorb in the form of heat.
We describe these moving electrons as current. This current flows because of a difference in potential between the two ends of the coil. This difference in potential is realized because both ends of the coil are connected to different sides of your plug, which gain their difference in potential from the processes in the power generator.
The power generator itself probably runs on coal, burning it to release its chemical energy in the form of heat. The coal got its chemical energy because it is composed of the leftovers of biological life that lived long ago. This life ultimately got its energy from the sunlight, through photosynthesis. This sunlight takes the form of photons racing through space, originating from the sun, and travelling, among many other places, to the earth.
The photons are created in the sun because they are emitted by highly energetic helium atoms. These helium atoms are so energetic, because they were formed by two hydrogen atoms fusing together under immense temperature and pressure. The energy comes from the fact that the helium atom is just ever so slightly less heavy than the two hydrogen atoms combined. And this difference in mass is converted into pure energy (this is what Einsteins equation $E=mc^2$ means).
So ultimately, the energy that makes your lightbulb shine, comes from the tiny bit of mass that is lost when two hydrogen atoms fuse together in the sun's innards.
But of course, you could take this even further and ask where the hydrogen in the sun ultimately comes from. And how did all that mass come together to form the massive hot ball of plasma that is the sun? And then you get into all sorts of trouble when you start thinking about hugely fascinating things such as stellar evolution and the fundamental forces.
You can now see that no energy is ever lost. It can take on many forms, including that of mass, but it will always end up somewhere.
The only thing that does change, is that the energy as a whole gets increasingly more chaotic. Which means it's less usable. This is what we mean when we say that entropy (or chaos) must always increase. It is the reason that we can't use the heat leaking out of our houses to run a generator which powers our home; it is true that all the energy we put into our house (current, gas) also flows out of it again (in the form of light, heat, sound). But things like light, heat and sound are much more chaotic than the energy neatly stored in molecules of gas or moving electrons. We can't undo this chaos. (Or at least we can't without using even more energy in the process.) And when you start thinking about that you get into things such as thermodynamics, Carnot cycles, and a whole other bunch of interesting stuff.
So yeah, where does the energy come from? It depends on how far you want to look back.
Mass is energy, and energy cannot be created nor destroyed*.
So if you have a mechanical push, to a magnet movement, through a copper wire, that is in a loop. The free-flowing electrons will move from the atoms of the copper wire and be pushed around a circuit. Nothing lost.
If you add a light bulb, the some of those electrons will be shot out of the bulb, and your system will now lose electrons. But those electrons will be present in a different environment (ie Absorbed, Refracted, etc etc) within our Universe.
This proves that professors have been wrong for many years, that Electromagnetic Generators are not theoretically limitless. The copper-atoms will eventually lose too much electrons that they cannot lose anymore. Where the mechanical movement will create less and less electron circuiting, and less and less light getting emitted. It is theoretically possible to actually "steal" extra electrons from the copper wire and push them out of the light-bulb. This would make the copper wire itself magnetised, and would make it much more difficult to mechanically push the central magnet. In real-world, this does not actually happen, but it is okay in theoretical models. However do note the distinction I made earlier, since we know Electromagnetic Generators do practically break down... it is the theoretical part which was thought incorrectly.
So remember, electrons are a finite resource within the generator. I think this answers your question, since, JSQuareD actually avoided answering it by changing your premise of a mechanical-electromagnetic-generator to one running off a coal power plant.
*technically, the first-law of thermodynamics is wrong. Our universe can and does create energy from nothing. And destroys energy from something. However, it has a strong tendency to practically never happen, and when it does it always is balanced out instantly. What we think about in terms of Physics kind of gets turned on its head when you head into the Quantum level and dealing with Planks Constant. This means there's an almost-zero small possibility that an Electromagnetic-Generator can produce electrons/light and not lose electrons from the copper-atoms as they can be replenished seemingly randomly (as if by God, From another dimension/tesseract, or in a calculation error of a simulation).