I have to agree with the previous poster, particularly if you look at the way Simon, arguably the most insightful member of the group of boys, eventually figures out that the "beast" is actually the evil that is within the boys rather than some external creature or parachutist or whatever else. The fact that Golding gives Simon this realization and then Simon is killed immediately thereafter serves only to emphasize this discovery.
As such, Golding is really pointing out the danger of that evil within us and the fact that without some constraints, it can lead us to do things that are rather terrifying.
In my opinion, what Golding is warning us about is not so much that we should not do evil. I think he is warning us that there is evil within each of us and that we need to be careful not to let it get out of control. I think he is telling us that we need civilization to keep our evil tendencies in check.
I don't think he is telling us not to do evil things because that is too obvious -- everyone knows you should not do evil. But how do you prevent people from doing too much evil? I think Golding is saying that we cannot be complacent. We must always be on the lookout for evil and we must try to set up our society in such a way that evil is discouraged rather than encouraged.
One thing that I tell my students over and over when we discuss this issue is that we are all capable of evil given the right circumstances. Although we do not like to admit it, it is easier to commit evil than to do the right thing. This novel provides many moral lessons for our students and allows us to look deeper within ourselves.