Good question - to answer this question, I think we would need to investigate where and why loyalties exist. Initially, all the boys are loyal to Ralph and his leadership, but by the end of the novel, all of the boys, except for Piggy, have shifted loyalty to Jack. The loyalty to Ralph at the beginning seems to come from his innate leadership and the symbolic power of the conch shell that he holds. The boys come when he calls, sit through his meetings, and are willing to listen to him at first. He has a more mature attitude which places him above the others. Jack, however, begins to steal their loyalties through the devices of cruelty and fear. He 'lures' boys into his hunting parties promising them meat to feed their hunger. He also shames and belittles those who oppose him, causing others to fear going against him. By the end of the novel, his 'power' to create loyalty proves stronger than Ralph's, even leading the other boys to murder. In reality, Jack simply uses the boys own desires and fears to make them loyal to him - so in essence, the boys are simply remaining 'loyal' to their own desires without concern for anyone else, and Jack is able to play off of that to create his tribe.
Consider this quote from the novel: "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."
The "true, wise friend" brings to light the theme of loyalty. Piggy is loyal to Ralph and believes in him. He stands up for Ralph when Jack challenges Ralph's leadership, and he encourages the others to stay true their elected leader.
Likewise, Sam'n'Eric and Simon are loyal to Ralph. They can see the danger of it - at least Sam'n'Eric can - but remain with him when the others have deserted. They are influenced by their fear of Jack, but are more swayed in their loyalty to the boy they feel is the rightful leader.
Similarly, Jack's boys are loyal to him. His road to power came from the group of choir boys that transferred their loyalty from school to the island. Those boys were never loyal to Ralph. They accepted his leadership because Jack did. When Jack rebels, they follow.
Golding portrays the positive and negative of loyalty through the two 'leaders'. In the case of Jack, continued loyalty led to corruption of the spirit, becoming murderers. In the case of Ralph, continued loyalty showed courage and conviction. As with most human traits, the results can tend towards good or evil.