Lord of the Flies, by William Golding, is a symbolic novel, which means that any elements that appear consistently in it are probably meaningful to the themes of the novel. Fire is one of those symbols.
From the beginning, fire plays a significant role in the story. In a practical sense, fire is necessary for the boys' best sustenance. While they generally eat fruit, they cannot cook any of the meat the hunters get without fire. It provides heat and warmth, of course, but the boys continually struggle to keep a fire going.
Fire is a symbol of defeat. Ralph desperately wants them all to keep a fire going; however, it is an impossible task for the easily distracted and careless boys. Early in the story they have an opportunity to be rescued, but they miss it because the hunters have let the fire go out.
At the same time, fire is a symbol of hope. The boys are stranded on an island with little hope of rescue unless a passing military ship sees smoke on the island. Ralph, the newly elected leader, is adamant that they keep a fire going in order to have a chance at being rescued.
Fire is also a symbol of power, and it can only be started with Piggy's glasses. While Piggy is willing to let the others use his glasses, people steal them twice; the second time, Piggy does not get them back, so the only fire on the island is at the fort where Jack and his savages live. This act virtually seals the fates of both Ralph and Piggy.
Ultimately, fire is a symbol of death. In their enthusiasm, the boys race to make their first fire, and it becomes a conflagration which inadvertently kills one of the little boys. The fire which was supposed to rescue them becomes an instrument of death.The little boy is killed in the initial fire, Piggy is indirectly killed because the hunters want fire for themselves, and Simon is killed as the boys are chanting in a circle around the fire. The final fire in the novel is set in order to flush Ralph out of hiding so the rest of the tribe can kill him. This is foolish, of course, because when the out-of-control fire burns everything on the island, there will be nothing left to eat.
Ironically, this death fire becomes a symbol of hope as it manages to capture the attention of a passing ship which saves Ralph's life and rescues them all.