It is taught in the name of Rabbi Natan: The sphere of the sun has a pouch; that is what is written: “He set a tent for the sun in them” (Psalms 19:5). There is a pool of water before it. When [the sun] seeks to emerge, it becomes enflamed, and the Holy One blessed be He weakens its strength with water so it will not incinerate the world. But in the future, the Holy One blessed be He will strip it from its pouch, expose it, and incinerate the wicked with it, as it is stated: “For, behold, the day is coming, burning like a furnace, [and all the criminals and all those who do evil will be straw; the day that is coming will burn them]” (Malachi 3:19).
Rabbi Yannai and Rabbi Yishmael, both of them say: There is no Gehenna in the future; rather, the sun will emerge. The righteous will benefit from it. From where [is this derived]? It is as it is stated: “It will rise for those who fear My name, a sun of righteousness with healing in its wings” (Malachi 3:20). And the wicked will be punished with it, as it is stated: “The day that is coming will incinerate them” (Malachi 3:19).