How does Ralph and Piggy's relationship change from beginning to end? What events happened between them?
When Ralph and Piggy emerge from the wreckage, they are just survivors and acquaintances. However, as time goes by, they become close friends. Piggy respects Ralph’s strength and authority, and Ralph respects Piggy’s wit and direction. The two friends are also brought closer together by their need to maintain a civilized society among all the children on the island. Ralph agrees with Piggy’s idea to use the conch shell to maintain order and structured leadership among the boys.
Ralph confronts Jack after he attacks Piggy, standing up for his friend in the event. Piggy supports Ralph despite Jack and the other boys forming a neighboring savage tribe. However, Piggy’s unwavering support for Ralph leads to his untimely death; he is caught in a fight between Jack and Ralph and ends up dead after Roger rolls a boulder that crushes him.
When they first meet, Ralph seems to have little respect for Piggy--not returning the courtesy of asking him his name, telling the others about how Piggy was called that name back home, etc. Regardless of how Piggy was perceived by others, though, Ralph still remains friends with him.
As time progresses, Ralph realizes the true friend that Piggy is. Not only is Piggy insightful about what needs to be done, he is also a loyal companion even as their society begins to fall apart on the island. Ralph is forced to protect and stick up for Piggy, such as in the scene where Ralph and Piggy confront Jack and his "tribe" in order to get back Piggy's glasses.
At the end of the novel, Golding makes it clear how important Piggy was in Ralph's life, as Ralph, once rescued, wept for the "one true friend" that died on the island.