The panel EGC and neutral look awfully small... And the terminal bus is rusty.
Looks also like the insulation wasn't stripped properly on that burnt wire, either- not only was it offset and the screw not properly clamping it, but might have been insulated from the screw preventing proper contact, too. Poor contact = not enough fault current to trip the breaker + excessive heating = fire.
Top pic...bad connections, two conductors under 1 screw. Result of low quality workmanship. This design of neutral/ground buss was in GE panels, and the installer had to get the conductor directly under the screw to get a decent termination. Two conductors result in deflection to the sides of the screw, resulting in a poor termination. the poor termination results in a high resistance connection, creating heat on the neutral conductor, and you have a pic of the ultimate end result. This is based on my opinion, and experience.
The second pic, IMHO is an OLD panel that has a corrosion situation. Also, it appears that the two conductors under 1 screw situation is here also.
Rhagfo: Terminating the neutral and ground conductors in one lug, or under 1 screw was a 'trade practice' in some areas. The reasoning was to keep the neutral & grd 'together' for tracing purposes. BTW, not a 'practice' that I have done, nor taught to anyone, but something the 'old-timers' passed on to the 'young guys'.
I'd venture that a loose connection+neutral current on the EGC leads to a burnt/corroded connection. In times gone by it used to be common practice to put 2 neutrals under one screw, this created a definite hazard when one of the circuits is a multiwire, and the other circuit was being removed or serviced.
Current code would of course demand 1 neutral per terminal. Manufacturers instruction state 1 conductor per terminal for Grounded circuit conductors. The bonding terminal however are allowed 2 #14 or 2 #12 copper or 2#12 or 2#10 aluminum under 1 screw. 1 wire per terminal for larger bonding conductors up to the largest wire permitted for the particular bonding terminal which is often #6. Larger bonding conductors can be accommodated by adding factory approved lugs to the bonding strips or to the enclosure. I have always followed the 1 neutral 1 screw but until about 10 years ago it was as many bonding wires as would fit as long as we twisted them all together.