I have read and heard that the mammatus cloud formation presents a danger to aircraft and is often associated with funnel clouds and tornadoes. How is it formed and why is it dangerous?
Nobody knows exactly how mammatus clouds are formed, it's been studied and there are several theories about it but none are accepted. They are most often seen below anvil clouds, ie cumulonimbus clouds with extremely powerful updrafts. One thing that the theories all agree on is that where they are formed on the underside of cumulonimbus clouds there are huge shifts in temperature, moisture and pressure within a short space of time. Although these clouds can form under other types of cloud they are mostly seen under the most powerful of storms.
So why are they dangerous?
So mammatus clouds are usually an excellent sign of an area to be avoided.
Mammatus clouds are very gentle downdrafts, typically seen beneath the anvil or along the flanks of a thunderstorm, though they may also be occasionally seen under stratus and altostratus clouds. The reason for the udder-like shape is not well understood, though there are several interesting theories. Aircraft flights through the udders has described them as "rain-filled sacks" with very light turbulence. They are not a sign of heavly turbulence or severe weather, though they are often found in the aftermath of a severe thunderstorm (or any thunderstorm). Their most distinctive characteristic is their attractive appearance.
Based on the fact that mammatus clouds are associated with crazy air currents, it would very easily throw an airplane out of control.