An ember is "a glowing fragment (as of coal) from a fire" and is often the last little bit of heat and light when that fire is dying.
In The City of Ember, the world has suffered a catastrophic series of conflicts and almost all infrastructure to support civilization has been destroyed. The one remaining source of light is the electrical generator and distribution system in Ember, which is seriously outdated and failing due to its age and the diminishing supply of fuel. The parallels between the title of the book, the situation in the city, and the definition are obvious. As with an ember in a fire, Ember as a city is still alight but is struggling and its light is dying.