Because he's the voice of reason in a (small) world going mad and therefore he must be crushed to allow anarchy to reign unchecked.
Jack and his rebel band decide that the real symbol of power on the island is not the conch, but Piggy's glasses—the only means the boys have of starting a fire. They raid Ralph's camp, confiscate the glasses, and return to their abode on Castle Rock. Ralph, now deserted by most of his supporters, journeys to Castle Rock to confront Jack and secure the glasses. Taking the conch and accompanied only by Piggy, Sam, and Eric, Ralph finds the tribe and demands that they return the valuable object. Confirming their total rejection of Ralph's authority, the tribe capture and bind the twins under Jack's command. Ralph and Jack engage in a fight which neither wins before Piggy tries once more to address the tribe. Any sense of order or safety is permanently eroded when Roger, now sadistic, deliberately drops a boulder from his vantage point above, killing Piggy and shattering the conch. Ralph manages to escape, but Sam and Eric are tortured by Roger until they agree to join Jack's tribe.
Ralph secretly confronts Sam and Eric, who warn him that Jack and Roger hate him and that Roger has sharpened a stick at both ends, implying the tribe intends to hunt him like a pig and behead him. The following morning, Jack orders his tribe to begin a hunt for Ralph. Jack's savages set fire to the forest while Ralph desperately weighs his options for survival. Following a long chase, most of the island is consumed in flames. With the hunters closely behind him, Ralph trips and falls. He looks up at a uniformed adult—a British naval officer whose party has landed from a passing warship to investigate the fire. Ralph bursts into tears over the death of Piggy and the "end of innocence". Jack and the other children, filthy and unkempt, also revert to their true ages and erupt into sobs.
Piggy's death is pretty central to the allegorical theme of the story:
At an allegorical level, the central theme is the conflicting human impulses toward civilization and social organization—living by rules, peacefully and in harmony—and toward the will to power. Themes include the tension between groupthink and individuality, between rational and emotional reactions, and between morality and immorality. How these play out, and how different people feel the influences of these form a major subtext of Lord of the Flies
Both quotes here from Wikipedia - Lord of the Flies (book) (the 1990 film fairly closely follows the theme of the original book)