What are magnetrons installed on aircraft used for?
The magnetron is a high-powered vacuum tube, that works as self-excited microwave oscillator. They are used mainly in radar transmitters as either pulsed or cw oscillators at frequencies. In (civil) aircraft, they are mostly used in weather radars.

They have relatively simple construction but have been replaced in almost all aircraft due to their disadvantages:


They can usually work only on a constructively fixed frequency.
They have poor reliability.
They have high power consumption and have noise issues.
They have finite life, considerably lesser than solid state devices.


Most of the aircraft operating today use solid state devices in their Radars. It may be still used in some older aircraft and helicopters, but they are becoming increasingly rare.

Weather radars are regularly used by pilots to detect the weather conditions in front of them. According to Airbus Flight Operations Briefing Notes: Optimum Use of the Weather Radar The weather radar only detects:


Rainfall
Wet hail and wet turbulence
Ice crystals, dry hail and dry snow. However, these three elements give small reflections compared to water droplets. 


It does not detect clouds, fog or clear air turbulence.

Most of the aircraft in the list were designed 25+ years ago and have (mostly) switched over to solid state devices. Aircrafts are rarely used after 30 years as maintenance becomes expensive.

However magnetrons are still used in some aircraft due to their simple construction and high power output. For example, the WU-880 Radar Receiver Transmitter Antenna in Honeywell Primus 880 radar used in Falcon 2000EX uses magnetron.

Note: Almost all commercial aircraft use convection ovens to heat food (they won't have aluminum foils if they microwave ovens were being used); however, microwave ovens are available for aircraft and are used in some executive aircraft.