The earlier answer is a succinct summary of the theme of the novel and I would only add that I was struck most forcibly by the speed of the boys' descent into primitive barbarity and fearful superstition once the constraints and norms of 'civilized' society have been stripped away. Of course the forces that could bring them back and restore a more humane form of society still exist - if I recall correctly from over 40 years ago, Simon is the main symbol of these forces for good - but they seem so tiny and weak in in the face of the savagery that confronts them. Golding seems to be saying that human progress towards civilized society is a very long and arduous journey but that regression to primitive savagery can occur almost in an instant. We can find examples of this in almost any period of human history.
The entire story is a allegory. In other words, the story represents abstract ideas through, in this case, characters and setting. Golding wants the reader to consider whether or not humans are born evil and are civil only because the consequences and restrictions of law and religion. Therefore, the jungle -- a place completely exempt of societal order -- is an ideal setting to analyze human behavior in its most natural state.