Most of what we learn about Ralph and Piggy's history is found in Chapter one when they converse with each other after their meeting.
It is clear from their conversation that the two boys are from different socio-economic backgrounds. Piggy's grammar is an indication that he most probably attended public school and lived in a working-class suburb, as illustrated in the following examples:
“I can’t hardly move with all these creeper things.”
“All them other kids,”
“When we was coming down I looked through one of them windows .."
We further learn that he had been raised by his aunt (and probably her husband) since his father died. He is quite embarrassed about speaking of his parents and falls short of saying anything about his mother, when Ralph asks about them.
Piggy flushed suddenly. “My dad’s dead,” he said quickly, “and my mum—”
He took off his glasses and looked vainly for something with which to clean them.
It is clear that his aunt spoiled him since she probably wanted to make up for the loss he suffered in losing his parents. She gave him as much candy as he liked and this resulted in his becoming overweight. Furthermore, he suffered from asthma and was constantly reminded and reprimanded about his condition by his aunt to whom he constantly, to Ralph's exasperation, refers. Ironically, her spoiling him that much might have brought about his ailment.
It is also evident that Piggy was incessantly mocked by other children about his condition. The memory about it pains him and he is quite embarrassed to tell Ralph that they called him Piggy. The painful irony is that Ralph, similarly and almost instinctively, jeers him.
“They used to call me Piggy.”
Ralph shrieked with laughter. He jumped up.
Piggy clasped his hands in apprehension.
“I said I didn’t want—”
It is sadly ironic that we never learn his real name because he, more than the other characters, probably even more than Ralph, truly cared about their humanity and strove to restore order and discipline. His shockingly untimely death introduces a complete turn of events.
Ralph clearly comes from a privileged background. He states that his father is
...a commander in the Navy.
As such, Ralph comes from an upper middle-class background and probably attended a private school. The fact that he is fit and lean suggests that he had regular exercise and was probably exposed to a regime of exercise and study at his school. Furthermore, he comes across as self assured and his quiet confidence is what later inspires the boys to elect him as their leader (and, of course, the fact that he was holding the conch).
Unlike Piggy, Ralph never suffered the cynicism of his peers and because he did not have to deal with the consequences posed by a broken family life, he had less to contend with than Piggy.