As an opening caveat, we must exercise caution in applying biographical information to a reading of a novel.
That being said, as other answers have mentioned, Golding's experiences as a schoolteacher at Bishop Wordsworth's school gave him exposure to the attitudes of young English boys. He experimented at the school with dividing his students into "gangs" that would fight over a "prehistoric" camp, an experience which probably influenced and informed his writing of Lord of the Flies.
Golding also exhibited a degree of honesty in describing his personal life, which spills over into his honest depiction of the darker drives and desires described in his novel. He admitted he could be a bully as a child and wrote in an unpublished memoir of attempting to rape a 15-year-old girl.
As a young child, Golding lived in a coastal town, Newquay, in Cornwall, which, though in a colder climate, may well have influenced his idyllic descriptions of the beach where the boys land.
Golding also lived through...
(The entire section contains 4 answers and 847 words.)