Another interpretation: "And the Lord rained down upon Sodom etc. from the Lord" (Genesis 19:24). What is the meaning of "from the Lord"? Rather, He says, "Behold, I will rain down for you bread from the heavens" (Exodus 16:4), and here it says, "And the Lord rained down upon Sodom." Rabbi Berekhyah said: To what is the matter comparable? To a king who was standing beside a baker's oven. His friend came in to him; he took out hot bread and gave it to him. His enemy came in; he raked the coals and gave them to him. So too the Holy One, blessed be He: when Israel came into the wilderness, He brought down for them bread from the heavens, as it is said, "Behold, I will rain down for you bread from the heavens" (Exodus 16:4); and when the Sodomites came to commit transgressions, He brought down upon them fire from the heavens, as it is said, "And the Lord rained down upon Sodom" (Genesis 19:24). What is the meaning of "And the Lord"? That He sat over them in judgment with a Sanhedrin of seventy-one, and found them guilty, and brought down upon them fire, and they went forth to burning, as it is said, "from the Lord, out of the heavens" (Genesis 19:24). In a similar manner you say: "And the Lord rained down... from the Lord." If a person comes to ask you what is written in this verse, "And the Lord rained down etc. from the Lord," say to him: there are in the verses similar cases. "And the king said to them: Take with you the servants of your lord" (1 Kings 1:33) — it needed only to say "my servants." And from where in the Torah? "And Lamech said to his wives: Adah and Zillah, hear my voice, you wives of Lamech" (Genesis 4:23) — it needed only to say "my wives." Behold, in the Torah. And from where in the Writings? As it is said, "For a writ that is written in the king's name and sealed with the king's ring" (Esther 8:8) — it needed only to say "with my ring." So too here: "And the Lord rained down etc. from the Lord."
Why Scripture Says The Lord Rained Fire From The Lord on Sodom
Midrash Tanchuma Buber, Vayera 19:1
ד"א וה' המטיר על סדום וגו' מאת ה'. מהו מאת ה', אלא הוא אומר הנני ממטיר לכם לחם מן השמים (שמות טז יד), וכאן הוא אומר וה' המטיר על סדום, אמר ר' ברכיה למה הדבר דומה למלך שהיה עומד אצל הכבשן של נחתום, נכנס אוהבו אצלו רדה פת חמה נתן לו, נכנס שונאו חתה גחלם ונתן לו, כך הקב"ה כשבאו ישראל אל המדבר הוריד להם לחם מן השמים, שנאמר הנני ממטיר לכם לחם מן השמים, וכשבאו הסדומים לידי עבירות, הוריד להם אש מן השמים, שנאמר וה' המטיר על סדום, מהו וה', שישב עליהם בדין סנהדרין של שבעים ואחד וחייבן והוריד עליהן אש ויצאו לשרפה, שנאמר מאת ה' מן השמים, כיוצא בדבר אתה אומר וה' המטיר, מאת ה', אם בא אדם לשואלך מה כתיב בפסוק הזה וה' המטיר וגו' מאת ה', אמור לו יש בפסוקין כיוצא בדבר, ויאמר (אל עבדיו) [המלך להם] קחו עמכם [את] עבדי אדוניכם (מ"א א לג), לא היה צריך לומר אלא את עבדי, ובתורה מנין, ויאמר למך לנשיו עדה ולה שמען קולי נשי למך (בראשית ד כג), לא היה צריך לומר אלא נשי, הרי בתורה, ובכתובים מנין, שנאמר כי כתב אשר נכתב בשם המלך ונחתם בטבעת המלך (אסתר ח ח), לא היה צריך לומר אלא בטבעתי, אף כאן וה' המטיר וגו' מאת ה'.