Piggy serves a few different roles in the story. One is as the representative of rational or scientific thought. He is the one of the group that tends to think through things and try to make decisions based on logic when many of the other boys are simply making them based on emotions.
The second important role he fills is that of almost a foil to Jack. He is the boy that is very smart and knows what "ought" to happen but he lacks any charisma, something Jack has in spades. So he serves to highlight the differences between the idea of civilization and the hunter-society Jack wants to start.
The other thing he represents is loyalty as he is willing to stick with Ralph and follow him all the way until his death despite not always getting credit for his ideas and often being teased or ignored even by Ralph.