Electricity is a very versatile method of providing power to lighthouses and is the preferred option in almost all cases today. It can be created (generated) in a number of ways, i.e. mechanically, chemically or by solar power. Of course, lighthouses on or close to the land can make use of locally supplied mains electricity, but lighthouses in remote places that cannot be reached by power cables need independent provision.
In a pure mechanical system, a coil of copper wire is wound around a holder. Around this coil of wire is placed a magnet which is attached to bearings that allow it to rotate. As the permanent magnet rotates around the coil, electricity is generated in the copper wire - a process known as electromagnetic induction. Now, the rotation can be produced by a number of means. If you attach a rotor blade to the magnet, you can allow it to rotate in the wind. You then have a wind generator. Or you could use the rotating crankshaft of a diesel or petrol engine to turn the magnet.
Electricity is generated from batteries in chemical processes going on inside the cells. The really good thing about this is that the electricity can be put into the battery by mechanical means and stored there, during the daytime or at some other time when it is available. Then the electricity in a charged battery is always available to draw upon at night. So this can be combined with a solar-powered system in which sunlight falls upon a silicon cell during the daytime to generate electricity that is then stored in a battery for use at night. The Eddystone lighthouse is now powered entirely by solar power, with the energy from the sun being stored in banks of batteries (known as accumulators) by day and used to power the light source by night. This is fine during the summer when there is plenty of sunshine, but there is an obvious problem during winter when days are short and there may be considerable cloud. Sufficient accumulators must be used to allow for days when little electricity is stored and a lot more power is consumed because of long periods of darkness. Back-up is provided in the form of diesel generators and if the betteries ever proved inadequate to power the light during a long spell of bad weather, a person would be landed on the lighthouse by helicopter to start the engines. Fortunately, this has so far not been necessary.