why is exterior of the microwave oven getting hot & the lights getting switched off
The exterior is getting hot because it is generating a lot of heat.  A pizza has a bit of mass and 180 degrees Celsius is hot.  It could be a safety shut off.  

And it could be broken.  

If it works fine with smaller items then more likely it is a safety shut off.