Why did he say "Damcha Al Roshecha"?
Targum Yonasan: Chovas Ketolach Tehi b'Reishach. Rashi - the liability for your death is upon you. Radak - the blood of Sha'ul, whom you killed, will return on your head.
Radak: You caused your own death.
It is written Damecha, and we pronounce it Damcha!
Radak: The writing hints to the bloods of Sha'ul and yourself.
Malbim: You are not liable for killing Sha'ul, for one is not believed about himself [for bodily punishment], but you are liable for killing the Kohanim and Mashi'ach Hashem, i.e. the Kohen Mashi'ach 1 (according to Chazal, who say that this was Do'eg).
"Your mouth testified against you, saying 'I killed Mashi'ach Hashem.'" Where did he admit to killing the Kohen Gadol?! Perhaps it is a Drashah that he is liable for killing the Kohen Gadol; the simple meaning is also true (he is liable for killing Sha'ul). (PF)
Why did David kill him?
Malbim #1: If he was truly an Amaleki, a Bnei Noach is killed without warning, and he is killed even for killing a Tereifah (one who was mortally wounded), and through one judge and one witness. Likewise, he is killed due to his own admission, just like he can be killed via a relative's testimony. This is why he said "your mouth testified against you."
Malbim #2: If he was a Yisrael, he was killed due to royal law. He said that he killed Mashi'ach Hashem; 1 [he must be killed], lest people intentionally strike the king.
Malbim #3: According to Chazal (refer to 1:2:1:1), that it was Do'eg, he was already Chayav Misah for killing Nov Ir ha'Kohanim.
Refer to 4:10:4:1 and the note there.
The king told him to do so! Would he not be rebelling if he refused? Perhaps since after following his command, he will not be king, one need not obey. This is like Maharsha (Pesachim 86b) explains why one need not obey a host who tells him to leave. (PF)