Why did Snape kill Dumbledore if he was good? Because Dumbledore asked him, and it was necessary. Dumbledore only had a few weeks to live and if he died of the curse on his hand that could pass the mastery of the Elder Wand to Voldemort - he needed to be killed by an ally.
Severus Snape killed Hogwarts Headmaster Albus Dumbledore because he had been asked to do so by Dumbledore himself. Dumbledore found out about Draco's task to kill him and so asked Snape to do it instead.
As it turns out, Dumbledore asks Snape of this because he wants to spare Draco from a wounded soul and the wrath of the Dark Lord himself, Voldemort. We know Draco isn't as evil as his family, and since he can't bring himself to kill someone, Dumbledore feared the boy would ultimately die at the hands of evil.
He's pleading with Snape to kill him. This is never explicitly said, but it's implied to be what he meant when he tells Snape (in the Pensieve) that he, Snape, will be helping “an old man avoid pain and humiliation” by killing him.
“You disgust me,” said Dumbledore, and Harry had never heard so much contempt in his voice. Snape seemed to shrink a little, “You do not care, then, about the deaths of her husband and child? They can die, as long as you have what you want?” Snape said nothing, but merely looked up at Dumbledore.
At one point, Snape is named as a Death Eater by Igor Karkaroff, but Dumbledore comes to Snape's defence, claiming that although Snape had indeed been a Death Eater, he changed sides before Voldemort's downfall and turned spy against him.
However, Draco was ordered by Voldemort to kill Dumbledore. Lestrange saw this as an opportunity to test Snape's loyalty and while making this vow to always watch over Draco, Lestrange forced Snape to agree to killing Dumbledore himself in case the youngster was unable to do so.
Who would have guessed that Snape could love anyone, let alone Harry Potter's mother. He didn't protect Harry because it was the right thing to do; he didn't risk his life by being a spy for Dumbledore because he enjoyed living on the edge; he couldn't even stand Harry, yet Snape died protecting Harry's life.
So in summary, Snape is so angry with Harry in particular because he is petty in a sense; punishing the son for the sins of a father he never knew. He's ferocious with the other houses and is only nice to his Slytherins because he needs to preserve his role as a spy.
In her estimation, in an attempt to protect the true Harry's identity, Snape sacrifices Hedwig, thus keeping the other Death Eaters off his scent albeit for only a short time.
Dumbledore reveals how thoroughly he loves Harry. Harry is brave, and Dumbledore is proud as any father would be. More than that, Dumbledore succumbs to a parent's weakness; he cares more about Harry's happiness and wellbeing than the wizarding world he is trying to protect.
Though Harry encountered many opportunities that deemed Avada Kedavra necessary, it remains as one of the Unforgivable Curses Harry Potter never cast. For one, he viewed the spell as an immoral practice commonly used by users of the Dark Arts.
Because Voldemort literally took over the Ministry of Magic. And immediately after Dumbledore's death, Snape disappeared with the rest of the Death Eaters from the Astronomy Tower. The Ministry had a hard time tracking any of the key players in Voldemort's ring.
So, during the summer between his fifth and sixth years at Hogwarts, Draco Malfoy was tasked with the assassination of Albus Dumbledore to restore his family to Voldemort's good graces. Also at this time, Draco was branded with the Dark Mark.
Long story short, Voldemort trusted all his Death Eaters, no matter their blood status. If they could prove their loyalty, which Snape did, they were trusted.
The acclaimed author explained that Harry paid tribute to Snape because of "forgiveness and gratitude." Though Snape bullied Harry, he also saved him.
He doesn't trust Snape as Dumbledore does, but he believes that he can detect any disloyalty. Moreover, Voldemort regards Snape as highly intelligent and therefore ' as a true Slytherin ' a person whose top priority is to take care of himself. To his twisted mind, selfless equals stupid.
Now, as firmly established, Snape was not the greatest fan of Harry, but that didn't mean that he ever stopped loving Lily. Dumbledore was surprised that Snape seemed to care for the boy. With a swish of his wand, Snape conjured up a Patronus – Lily's Patronus, a doe. 'Always,' he said.
He played the part of a loyal servant to Voldemort so well that Voldemort thought of Snape as his most loyal and capable servant. He regretted the (supposed) necessity of losing his (supposed) most valuable servant. He felt nothing for Snape as a person — the only person who mattered to him was himself.
Arabella Lily Snape (born 12 June 1981) was a half-blood witch and was the only daughter of Professor Severus Snape and an unknown descendant of Slytherin. She attended Hogwarts from 1992 until her death in 1998.
However, years later, when Harry is 16, Dumbledore sees that Severus' patronus is STILL a doe, like Lily's. Meaning that Snape is STILL deeply in love with her, or at least with her memory. And if you note, it's said more as a statement than as a question - little intonation.
Similarly to Harry, Snape's patronus represents a person. In the memories he gives Harry before his death, Snape shows Dumbledore his patronus, using the form to prove his love of Lily Potter, Harry's mother.