Board Thread:False Info and Speculative Discussion/@comment-1487677-20160211064625/@comment-26879545-20160211145336

Peter's memories implied it could only be done by the second full moon since the werewolf's death. The worm moon just happened to be the full moon that Lydia brought him back.

Derek was one of the ingredients, so to speak, that brought Peter back. He needed the power of the full moon, as well as an Alpha spark.

Peter didn't kill Derek when he was revived; he only used some of Derek's Alpha spark's power. Now, and this is speculation, it could be that any Alpha would have been able to do the same thing. For example, had Scott been an Alpha back then, it could have been him that Lydia would have used. Derek just happened to be the only Alpha in Beacon Hills at the time.

As for why he lost his spark when healing Cora, it was stated that when a werewolf takes away pain, the wounded person is drawing from the power of the spark that gives them their abilities. Because Derek was an Alpha, he had an extra spark that he could use to heal her. However, it would come at the cost of either:

A) losing his Alpha spark and his Alpha abilities (best case scenario)

or

B) if it fails, it will probably kill him (worst case)