The Lord of the Flies can be viewed as a metaphor for what happened to Great Britain during WWII.
Golding as an Englishman would have experienced the same feelings as the boys. The boys are stranded on an island after their plane is shot down. England and Europe were thrust into chaos and confrontation from the German attack.
Redefining civilization, fear and survival are key themes that run throughout the book.
The boys are in a war-like situation. The senselessness of killing, as in war, is also expressed in the book. In the book, some of the boys easily become savages, just as war can turn boys, not much older, into killers.
The idea of being stranded and waiting for help is another image that is reminiscent of England being desperate for assistance when Germany bombed and bombed London.
Although the city stood against the onslaught, they needed to be rescued by their allies, the same way that the boys needed to be rescued. There was nothing that England could do in the war, just like there was nothing to boys could do, except fight to survive, and signal for help.
The similarities between fighting, surviving WWII, and the boys fighting and surving on the island are clearly expressed in the book.
Golding also examines the nature of human relationships under the most stressful and dangerous conditions in the book, again very similar to war.