Venting microwave ovens is safe, although improper ventilation can cause components of the microwave to break. Microwaves produce non-ionizing radiation, which does not pose environmental harm, even if the ventilation is insufficient.
Microwave ovens placed on a counter rarely require extra ventilation; the warm, humid air released from the unit expands and dissipates safely. However, custom units typically need to be vented in some manner to prevent heat build-up, which can damage cabinetry and even damage the microwave itself.
However, ventilation still provides little protection against microwaving metal and other unsafe items. While ventilating dangerous chemicals outdoors can prevent some harm, leakage and potentially fire can pose a significant health threat.