In the book, 'diamond' refers to the solar energy sources found in a cave near the city of Ember. They are blue crystals with electrical wiring inside and a metal collar that holds a lightbulb, and are small enough that they are easy to carry, both by hand or by tying them to a belt. They turn on and off with a switch. They hold an eight hour charge if set in the sun for fifteen minutes.
The first, and apparently only, diamond is found by the The Troggs in The Diamond of Darkhold. They consider it to be a jewel, not knowing it's true purpose, and plan to sell it so that they can be rich. However, Doon Harrow steals it with the help of Scawgo, and smashes it on a rock while trying to save Lina Mayfleet from wolves. Doon and Lina later find out that there are another thousand diamonds in a secret room.
Diamonds can not only be used to make light, but also to power any electrical thing. Doon finds this out, and powers a fan and a toaster. He also finds how they can be used to make a spark to start a fire, and how to hook them together to provide more power.
The discovery of diamonds helped to rebuild civilization, finally providing humans with an electricity source. They are able to rebuild the old cities, but they no longer rely on fossil fuels of energy, instead using the sun as a new, clean energy source.