The metal mesh, or 'cage' around a microwave's oven cavity acts as a Faraday cage (see Wikipedia article on Faraday cage here), although a 'true' Faraday cage is grounded, and a microwave cage is not.
A cellular phone inside a Faraday cage will be protected from outside EM transmissions, just as conversely, the transmissions of the phone inside the cage will be blocked from reaching outside the cage.
According to Wikipedia, a Faraday cage can be thought of as an approximation to an ideal hollow conductor; When an external electrical field is applied to the cage, the electrons in the metal move towards the side of the cage that is closes to the source of the transmission, giving it a negative charge, while the remaining unbalanced charge of the nuclei give the other side a positive charge. These induced charges create an opposing electric field that cancels the external electric field throughout the box.
However you wish to visualize the principals that govern how a Faraday cage works, it is well established that to block a transmission of a particular frequency, size of the largest hole in the Faraday cage must be AT MOST 1/2 the wavelength of the frequency of the undesired transmission.
According to an online calculator, the wavelength of 2.45 GHz (the frequency of most domestic microwave ovens), the wavelength will be approximately 12.24 cm, or 4.82 inches. Taking half of that, we learn that the holes on a microwave oven could be 2.41 inches at most, although I'm not sure I would be very comfortable with that!
Now in theory, light could be blocked on the same principle, but considering that visible light has a wavelength somewhere around 390 to 700 nm, you can see now why visible light passes through the mesh of a microwave door, where as microwaves do not.
As to the question of why are the holes on a microwave oven door so small, well this is just speculation but I assume manufacturers just wanted to be safe by a wide margin. Also, if you mistakenly put metal into a microwave, you would get arcing and re-transmission of EM energy, possibly at different wavelengths. A piece of metal in a microwave would act as another antenna, possibly with some of the re-transmitted EM energy being dictated by its length.
I looked at my microwave door, and the holes on the front are approximately 1mm wide. Working backwards from length, a 2mm wavelength would be at a frequency of 150 GHz. Since most antenna are some fraction of a wavelength, typically 1/2 or 1/4, a 1mm antenna could produce a signal of this frequency, but I am unsure as to whether such an antenna would be very efficient at re-transmitting a 2.45 GHz signal, and what frequency that would be at; I am not much for antenna theory. I do feel, however, it would be very efficient at arcing and vaporizing itself rather quickly.