In Lord of the Flies, Golding shows that, regardless of age, humans are capable of good and evil. Clearly, Ralph, Piggy, and Simon are the ethical, logical characters in the book. Jack and Roger resort to savage and even evil behavior. Some let the environment determine their behavior; others do not.
It is probably safe to say that prior to landing on the island, each of these boys had certain inclinations about their personalities. For instance, Piggy's asthma and physical appearance led to him being ridiculed and perhaps led him to resort to books and knowledge. We can only speculate about his and the other boys' lives prior to being stranded on the island. But one could argue that Ralph might have had better role models in his life than, say, Jack or Roger. In any of these cases, the boys were products of their environments. Golding does not go so far as to suggest that any boy has/had genetic predispositions toward good or evil, or that they were born in one of these two ways. He focused more on the duality of humanity: capable of being good and evil.
As for their behavior on the island, you could argue that Golding, again, shows a dual position: some boys become products of their environments and others rise above it. Jack, Roger, and their followers, no longer in a civilized environment, become savage, more violent and animal-like. Now, one could argue that they do this as a means to survive, but they have abandoned reason (and the ideal means of survival: being rescued). They ignore building shelters and keeping the fire going, the smoke signal being their best means of rescue. On the other hand, Ralph does not succumb to this savage behavior. He and Piggy use the conch to establish a civilized order. It is symbolic when the conch is smashed and Piggy is killed; Jack and Roger are trying to eliminate any sense of civilization and order. Simon seems to be an even better example of one who is true to his peaceful self regardless of his environment.
The takeaway is that humans are capable of both good and evil. And humans can let the environment determine their behaviors but this does not have to be the case.