Does the heating efficiency of a microwave oven depend on the state of matter that it heats? If yes, how?
Yes ! The heating efficiency of a microwave depends on the efficiency of microwave generation AND where the microwave power is absorbed - in food, in air (very inefficient), in the oven itself (as when the oven is empty).
Liquids and solids, being denser than gas, absorb waves more effectively, but there is à huge difference between polar (such as water) and non-polar molecules. Metals reflect instead of absorb (because of free charges).
Notethat solid water (ice) absorbs less than liquid water because the molecules are "locked" in position and therefire cant be accelerated as much by rotation resonance with the electric field.
A microwave oven is a Radio Frequency power source, it excites polar molecules through "dielectric heating". As mentioned above the energy will have less effect the lower the material density, as there are fewer molecules to excite per unit volume.
As heat is thermal motion of atoms and molecules, the heat is more efficiently transferred through materials where the molecules are tightly bound. In a gas, you may excite a gas molecule or atom but it has to travel a comparatively large distance to impart any of that energy to it's neighbor or impart that heat energy on an object.
It all comes down to density.