The Gemara in Masechet Shabbat (p. 39) states that “Bishul B’Hama”-cooking using the direct rays of the sun is permitted on Shabbat. For example, one may heat a glass of water by placing it outside in the sun. The Menuhat Ahaba (Rabbi Moshe Halevi, Israel, 1961-2001) even allows using a magnifying glass to concentrate the sunlight on the water, even if it brings the water to the boiling point. However, it is prohibited to use the magnifying glass to make a fire and then cook with that fire.
Rashi explains that there is neither a Torah nor Rabbinic violation involved in cooking in the sun, since that is not the normal way of cooking. Rav Moshe Feinstein (Russia – New York, 1895-1986) in his Iggerot Moshe (3:52) understands Rashi that any type of cooking which is not the normal method was never prohibited by the Rabbis, but if a method other than fire becomes the norm, it may be even be prohibited from the Torah. According to this approach, cooking in a microwave may be prohibited form the Torah. Even though it is not cooking with fire, since it has become accepted practice, the exemption no longer exists.
It should be noted that the Egleh Tal ( R. Avraham Borenstein, Poland, 1838-1910, Melechet HaOfeh 44) understands Rashi in a different way. Hacham Ovadia (Hazon Ovadia Vol. 4 p. 402) argues that cooking with a microwave is fundamentally different then cooking with fire, and therefore, although it is the norm, it is not prohibited by Torah law, only by Rabbinic law.
No authority holds that it is permitted to cook with a microwave on Shabbat. They merely disagree as to the level of the prohibition. The Mishna Berura Tiferet (318:52) cites Rav Shlomo Zalman Auerbach (Jerusalem, 1910-1995) that if the prohibition is only M’drabanan, then microwaves would be the preferred method for cooking in the event that a sick person needs cooked food.
It is permitted to heat food and water directly in the sunlight or with a magnifying glass.
In the even that a sick person requires cooked food on Shabbat, it is preferable to use a microwave rather than a conventional oven.