Lord of the Flies has traditionally been read by students in high school and middle school and this is one of the reasons why the novel has a recognizable name today. That being said, when the novel was originally published in 1954, William Golding probably intended it for a general audience of adults. Lord of the Flies is not the only novel to follow a similar path. As the eNotes study guide points out, Lord of the Flies became a rival of Catcher in the Rye partly because of the popularity of both novels on college campuses. The same could be said for novels like To Kill a Mockingbird (which won the Pulitzer Prize but is now the subject of an annual essay competition for high school students) and A Separate Peace. Though novels for young adults had existed before the publication of these books, much of the earlier young adult fiction had consisted of adventure stories (e.g. Captains Courageous or Treasure Island.) Novels like Lord of the Flies and Catcher in the Rye, for better or worse, went a long way toward redefining the genre.
Further to the earlier answers, Lord of the Flies was inspired - if that's the correct word - by a novel aimed at young readers called The Coral Island by R M Ballantyne in which some boys marooned on an island have fairly conventional boys' fictional adventures. However the boys themselves remain 'civilized' and Christian, unlike those in Lord of the Flies, in which Golding seems to be saying that most of us are capable of savagery and primitive behaviour given the 'right' circumstances. This is not a theme that young readers would relate to, so I would suggest that Golding had adults of 18+ in mind for his audience. Incidentally, Golding gave two of his boys the same names as Ballantyne's, presumably to underline the fact that his novel was a deliberate response to the idealized central characters of The Coral Island.
I'm not sure it was targeted for any group. The use of adolescents as principal characters certainly gives it some sense of being written for that group. But adolescents might also have been used because of they are under the influence of adults in their daily life and we get see them, and perhaps our/human nature, without the "rules" that control us. When you remove the "thin veneer of civilization" and put these "innocent" boys on an island, what do you get?
This suggests to me that the book might have been written for an older audience dealing with questions of the basic nature of man, the role of organized society in maintaining order, and how we would live minus all controls. In some ways it reminds me of the Myth of the Ring in "The Republic."
But it's also a great story for kids.
At our high school the novel is aimed at 10th graders. However, older students would do quite well picking symbolism and other literary elements. They would also do quite well digging beneath the surface and exploring hidden motivations and agendas.
Some of the themes in the novel may be a bit too much for the middle school crowd. I read the story in the 9th grade. I think that is an appropriate grade level.