What is Samneric's role in Lord of the Flies?
Samneric in many ways function as one character in the novel and are often referred to as such by the other boys. They, in some ways, form their own "community," which perhaps helps them to hold on to their sense of civilization and societal structure longer than most of the other boys. They have each other to remind them of what they think and believe - even helping each other to finish their sentences - so they don't lose track of their morals quite so quickly.
The twins are some of Ralph's more faithful workers, spending a lot of time tending the fire on top of the mountain. It is the twins who first see and report the "beast" on the mountain - this is significant because they are the first of the bigger boys to report seeing a beast. When Ralph, Jack, and Roger later climb the mountain and confirm there is something strange up there, Samneric maintain their status in the group.
When many of the other big boys later run off with Jack to join the hunting tribe, Samneric remain faithful to Ralph. Even after being caught up with others in the eating of meat and killing of the "beast" (Simon) in ch. 9, they return to Ralph's camp. Here, they exercise the ego defense mechanism of "denial" to deal with their role in the killing of Simon, instead of running to Jack's tribe and admitting their savagery.
However, they recognize the danger and savegery in the others and know the boys need to protect themselves when they go to Jack's camp to confront him about taking Piggy's glasses in ch. 11. Sam recommends they take spears, and Eric recommends they paint themselves - though Ralph refuses to wear paint. Ralph even recommends cleaning themselves up and trying to go as "civilized" as possible. The twins seems to recognize this will not help.
Once at Castle Rock, Samneric are captured and tortured by Roger until they join Jack's tribe. They watch as Piggy is killed and Ralph takes off running. However, they still show some allegiance to Ralph when later, as they are standing guard, they see him and do not report him immediately to Jack or Roger. They warn him about the plan for the next day to form a line across the island to hunt him out, and they also inform him that Roger has sharpened a stick at both ends.
While Ralph does not know what this means, the twins seem to be aware that this means Jack and Roger plan to put Ralph's head on a stick to offer to the beast if they catch him. They have seen how evil the boys can be, and the next day, after being tortured, they lead the other boys to where they saw Ralph the night before and join in the hunt. They are, perhaps, acting more at this point out of self-preservation than savagery, but their "community" is now with the hunters. Ralph has no one left on his side - until the naval officers appears, reminding everyone of who their true "civilized" leader really is.