After his experience of the horrors of war, an experienced writer named William Golding described as "one had one's nose rubbed in the human condition" returned to teaching and philosophy. However, Golding rejected the rationalism of his father and began his doubts regarding human nature.
After reading at night to his small children R.M. Ballatyne's adventure story, The Coral Island in which well-groomed civilized British boys defeat the savage natives on an island where they are stranded, Golding wondered out loud to his wife whether it would be a good idea to write another story as an allegory that is similar, but the characters "behave as they really would." His wife agreed, encouraging him to write what became his greatest work. An allegory of man, Golding's Lord of the Flies presents the evil that man is capable of by nature.
William Golding, the author of the novel Lord of the Flies, was in combat in World War II which had a huge influence on his views about life. He was present at the sinking of the prize German warship the Bismarck, participated in D-Day, and was horrified at the destruction of Britain by the German air force bombs. In the 1950's, a nuclear war seemed like a real possibility with all of the tension among major countries. It was in this atmosphere and this fear of another war that Golding wrote his book. If you think of his background and tie that into the book, it isn't surprising that his novel is dark, that the boys turn to evil, and the ending is uncertain. Golding wants the reading public to question war, to see the horror it brings and to see what it does to the people involved.