Why was Avimelech liable to the death penalty? He had not been warned!
Chizkuni (citing Midrash Rabah): From here we see that a ben Noach does not require warning.
Ohr ha'Chayim: HaSh-m was warning Avimelech that he would be Chayav Misah if he retained Sarah. 1
Seforno: This is not referring to the death-sentence, but to the blocking of all orifices, which had already begun and which would result in death, unless Avimelech returned Sarah and Avraham prayed on his behalf, as the Pasuk goes on to explain (20:7).
Makos 9b: A Nochri is Chayav Misah for not having learned that when visitors come, we ask about food for them, and not about their women. 2
Why was Avimelech punished less than Pharaoh?
Moshav Zekenim (to Bereishis 12:17): Initially Pharaoh was Shogeg, but later he was Mezid after HaSh-m told him that she is Avraham's wife.
Riva: Avimelech was also stricken; all his openings were closed. There is no source to say that Pharaoh was stricken more.
Why did HaSh-m warn Avimelech before punishing him, unlike Pharaoh?
Moshav Zekenim: HaSh-m knew that Avimelech was a Tzadik and he would heed the warning. Pharaoh would not; and had HaSh-m not made him a Tumtum, he might have blemished Sarah. Also, Avimelech took her honorably, through nobles, and in the way of marriage - "va'Yishlach... va'Yikach." Pharaoh did not, for he already had a wife.