Your question is too simplistic to give an accurate answer.
"Nail gun" covers everything from guns that drive 23 gauge headless pins to guns with extended magazines that drive 3.5" long framing nails. And specialities like plastic cap nailers for attaching soft sheet goods (like felt). And there are closely related tools like staple guns. So the first thing you must consider is the specific application.
The second thing you should consider is that you've omitted an entire very important category, namely combustion-powered nail guns, typically powered by a small cartridge of butane gas. Significant brand name in this category is Paslode.
Desirable features for nail guns include
1) portability
2) power to fully drive a nail full depth in the hardest material
3) speed (especially for roofing nailers)
4) repeatability/accuracy
5) lack of misfires/jams
6) capacity to work all day
7) easy of use (reloading, unjamming, positioning, setting aside)
8) ergonomics, including weight and weight distribution
9) ease of maintenance
No drive technology (pneumatic, combustion, electric) has a dominant advantage in all these categories.
Ignoring some electric staplers, combustion guns and electric guns usually have the advantage in portability as they are cordless/hoseless.
A well-designed nail gun can drive a nail full-depth in hardwood, using any of the three drive technologies, but not all guns are that well designed or made.
A well-designed nail gun can drive several nails a second, with no noticeable trigger delay, using any of the three drive technologies, but not all guns are that well designed or made.
A well-designed gun drives nails to a consistent depth time after time, using any of the three drive technologies, but not all guns are that well designed or made.
A well-designed gun avoids misfires and jams, using any of the three drive technologies, but not all guns are that well designed or made.
Assuming no power/fuel shortage, pneumatic guns can work all day long. Electric guns need batteries, and combustion guns need fuel cartridges.
A well-designed nail gun can be reloaded and/or unjammed in seconds, without tools, using any of the three drive technologies, but not all guns are that well designed or made. Positioning of pneumatic guns in tight locations can be obstructed by the hose, and in some designs of electric or combustion guns, by the position of the battery. A well-designed nail gun can be given a rafter hook or belt hook, using any of the three drive technologies, but not all guns are that well designed or made.
A well-designed nail gun is well-balanced for one-handed use, lines up the driver naturally with the line of the user's forearm, and can be held one-handed for hours. This can be done with any of the three drive technologies, but it is more difficult for electric guns due to the weight of the motor and battery pack.
A well-designed nail gun can have all typical wear parts (piston seals, driver pins, etc) quickly replaced using minimal tools. Historically this has been easiest for pneumatic guns, next easiest for combustion guns, and least easy for electric guns.
-------------
For any specific application, the best nail drive technology depends on what models the manufacturers are offering at the moment. The superiority of a nail gun is determined more by the quality and refinement of its design than by the drive technology.