Why does the Torah write here that "Avimelech did not approach her," yet in verse 20:6 that it was HaSh-m who withheld him from doing so?
Rashbam: This Pasuk is actually the introduction to 20:6.
What does the word "Gam" come to include?
Chizkuni, Ba'al ha'Turim: Avimelech was saying that if HaSh-m will punish him for taking Sarah, then He must also punish Avraham, for causing him to take her.
What is meant by "ha'Goy Gam Tzadik Taharog"?
Rashi: If HaSh-m would not withdraw His threat to kill him, he would arrive at the conclusion that HaSh-m punishes the innocent together with those who are guilty, just as He did by the generations of the Tower and of the Flood. 1
Riva: Why did you strike an entire nation (my entire household ) due to an individual (me) - and that individual is innocent!
Riva points out that according to this, the verse is out of order; it alludes to the previous generations before it refers to Avimelech!
What made Avimelech think that he was innocent?
Rashi, Seforno and Targum Yonasan: Because a. he did not sin intentionally (since he genuinely did not know that Sarah was Avraham's wife), and b. he did not even 'touch' her. That being the case, he felt he deserved to get off scot-free.
How far did he stay from her?
Hadar Zekenim, based on Bereishis Rabah 52:13: Even his slaves [whom he ordered to remove her shoes] could not so much as touch her shoe.
QUESTIONS ON RASHI
Rashi writes: "Would You kill a nation, though it is righteous? - You did so to the generations of the Flood and Dispersion as well; and I say that You killed them without cause!" How do we know that Avimelech compared himself to those generations?
Gur Aryeh: Avimelech was but one person, and yet his accusation was, "Would You kill a nation." Rashi therefore explains his claim as follows, "If you kill me [even though I am righteous], I will say that the entire generations of the Flood and Dispersion were also righteous, and You killed them anyway."