In the final scene Ralph weeps because he has lost his innocence. Why? In comparison to others, he was good.
Ralph actually weeps for three things in the final chapter of the novel:
And in the middle of them, with filthy body, matted hair, and unwiped nose, Ralph wept for the end of innocence, the darkness of man’s heart, and the fall through the air of the true, wise friend called Piggy.
Ralph has lost his innocence. He thought, at the beginning of the novel, that it was a "good island", but, by the end of the novel, has realised the truth: that the boys themselves have turned the island from an Edenic paradise into a burning, fiery hell. He has realised the "darkness of man's heart", the badness and evil within all human beings. He is aware - and he has witnessed (and, with Simon, participated in) the deaths of two young boys.
He was better behaved than some others. But he did join into the hunts, he did feel the "desire to squeeze and hurt". He failed as a chief to hold things together, and to present a viable challenge to the glamour and excitement of Jack's hunting. He didn't have the strength of Piggy or Simon, both of whom repelled the idea of the beast. The beast won out in the end, and destroyed the island.
Ralph weeps for the loss of innocense for a couple reasons. One reason is that he has finally come to realize, as Simon and Piggy did earlier, that the source of evil on the island and in all the world is the evil that is inside of each person. He now fully understands that each and every person is capable of terrible evil. He sees that Piggy and Simon physically died for that knowledge and now, he has emotionally died for that knowledge. He also weeps because he realizes that he, too, is capable of the horrible savagery he saw in the others. When Ralph encounters the pig's skull on the stick that was sharpened at both ends, he hits the skull, knocking it off the stick, then he takes the stick to use as a weapon. He was fully prepared to use that weapon to kill other boys if necessary. It was kill or be killed he figured. When he weeps, he understands that the savage beast is inside of him, too. Ralph weeps because he knows he will never be the innocent boy he once was because of all of this knowledge.