The meaning of all the deaths in HP:

James and Lily:To establish the story line as well as to show orphans of war.
Cedric Diggory:To show Voldemort's mercilessness.
Sirius Black:To show Harry's lack of guidance/parental figures.
Albus Dumbledore:To show the death of a great leader can't stop a war.
Hedwig:To show the end of Harry's childhood.
Mad Eye:To show the death of a soldier.
Dobby:To show even the smallest of creatures can die a Hero's death.
Fred Weasley:To show that some deaths you just can't get over. And that's okay.
Tonks and Remus Lupin:To reestablish orphans of war.
Colin Creevey:To show that the good die young, even when they aren't supposed to.
Severus Snape:To show that you can always change your ways. Always.