Why did Hashem speak to Moshe with the Name 'Elokim'?
Rashi: Because He was speaking to him with Mishpat (Midas ha'Din), because Moshe spoke harshly to Him and asked why He did evil to Yisrael.
If Hashem spoke to Moshe with Mishpat, why did He inform him that His Name is Havayah?
Da'as Zekenim (Pasuk 3): Even though I said that you are Elohim to Par'oh, I am Hashem also for you.
Oznayim la'Torah #1: Because Moshe was close to Hashem like a son to his father, Hashem rebuked him and immediately softened His stance. 3
Oznayim la'Torah #2: Following in the footsteps of the Goyim, Yisrael in Egypt thought that there was a god of good and a god of evil, and that consequently, the same G-d who had responded to Moshe's request by making matters worse, could not possibly bring about their redemption. Therefore Elokim spoke to Moshe and said "Ani Hashem!"
Rashi: Consequently, He did not send Moshe in vain, but to carry out the promise that He had made to the Avos (who went in His ways) that He would redeem their children.
Oznayim la'Torah: This is because the Name Havayah stands for 'Hayah, Hoveh ve'Yih'yeh', which in turn, teaches us that Hashem can be relied upon to keep His promise, since He will always be there, as opposed to anybody else, who is here today, gone tomorrow. See Tehilim, 146:3-7.
Oznayim la'Torah: Like Hashem said to Choni ha'Me'agel, when he spoke disrespectfully to Him
QUESTIONS ON RASHI
Rashi writes that Hashem spoke to Moshe with Mishpat. What is the source to say so?
Mizrachi #1: Elokim means judge. It is also Midas ha'Din.
Da'as Zekenim, Moshav Zekenim and Mizrachi #2, from Makos 11a: "Va'Ydaber" connotes harsh 1 speech.
Ta'anis (30b): Until Dor ha'Midbar died out (like was decreed after the Meraglim), Hashem's Dibur was not Misyached with Moshe. Rashi (Devarim 2:16) - i.e. it does not say va'Ydaber, an expression of Chibah (endearment)! Moshav Zekenim - only va'Ydaber Elokim is harsh. Bartenura (32:7) - when it says "va'Ydaber... Leimor", it is not harsh. Kli Yakar (Devarim 2:16) - va'Ydaber is harsh rebuke. Hashem rebukes one whom He loves (Mishlei 3:12).
Rashi writes that here, Shem Havayah alludes to faithfulness to reward. He should say that it refers to faithfulness to punish, for it is written near Elokim (Mishpat)!
Moshav Zekenim: "Va'Yomer Elav" separates Shem Havayah from Elokim.
Moshav Zekenim: Va'Yomer is an expression of Chibah (endearment).
Because the Torah writes "Elokim" in connection with Moshe, but the main message was in connection with Yisrael - Refer to 6:2:2:1.