In reality, the 20 mm Hispano round was probably the best compromise: high velocity, respectable rate of fire, good single hit damage capacity, and light enough to carry useful numbers of guns with useful quantities of ammo. However, no one round/gun combination has ever been the best at every task.
The British idea of 8 0.30 cal. guns on the Spitfire and Hurricane was to have an incredibly high volume of lead spraying in all directions (they originally didn't harmonize them). The idea was to maximize the probability of a single hit. Wartime experience quickly convinced them that concentration of firepower was necessary to knock down modern all-metal aircraft. Even concentrated, the 0.30 cal. proved to be too weak to do enough damage fast enough in the hands of an average pilot. But well harmonized for short range and fired accurately at that range... they were still very deadly.
I like the 0.50 cal. It has a rate of fire comparable to the 0.30 cal, isn't a whole lot bigger, but has much better ballistic traits in terms of weight versus velocity. It has enough punch to hurt any fighter when it hits anything important. If your mission is to kill fighters or strafe troops and unarmored vehicles, it was and still is a good choice. If you have good aim, it will decimate a fighter as well as any cannon, but it might require sustained fire to knock down heavier targets and it won't hardly do anything to armored vehicles.
Of course the lower rate of fire of the 20 mm is greatly offset by the results of a single hit. If you have good aim or you are just plain lucky, you don't need rate of fire... the explosive punch of a couple of 20 mm rounds will do the job. But the ammo loadout starts looking small compared to 0.50 cal. weapons. While better than 0.50 cal, it still isn't really good enough to take on heavy tanks.
30 mm as it existed in WWII was generally too slow to be of use against maneuvering targets. But if you are facing thousands of bombers flying in straight lines that can lose 20% or more of their structure and keep flying, you have different needs than the fighters escorting the bombers. More punch than the 20 mm was practically a necessity for German fighters intercepting bombers.
Any caliber higher than 30 mm was intended for anti-armor applications and did not really have the rate of fire to make air to air use practical, but some may have had the velocity? Though once again, if you can aim real well, I am sure a 75 mm cannon hit on an airplane will do some useful damage. 37 mm definitely was effective when well aimed

AH seems to do a pretty good job of modeling the range of compromises available. The absolute effects might be under or overmodeled to keep the math simple, but the relative differences appear to be generally correct. I rarely fight vehicles, but from what I have read on the bulletin boards, the AH gunnery model is still less the accurate. 0.50 cals may damage and destroy things they shouldn't while cannons may do little or no damage to things they should obliterate. I have no complaints because I would rather see AH continure to focus on being the best flight sim possible than waste time figuring out how to model vehicle armor properly. If better physics for vehicle damage also applied to improved aircraft damage modeling... then I am all for it

In the end, any weapon will do the job in AH, but you have to figure out which one fits your style of flying:
Point blank with sustained bursts from pea shooters.
Medium to long ranges with a tradeoff between ammo loadout and damage capacity: 6 x 0.50 cal is almost identical to 4 x 20 mm in net capability. 0.50 cal is nicer for hit probability and long range sniping, 20 mm Hispano is better for single ping shots at any range.
Point blank to medium ranges with short bursts of with any other cannon.
There is one trend, no matter which weapon/style you prefer, if you can aim well no matter what the firing geometry is, you will do much better than an opponent who cannot.
My range definitions are:
Point blank is less than 250 yards.
Medium is greater than 250 to 650 yards.
Long is greater than 650 yards.
I prefer 650 yards convergence for all my aircraft regardless of armament. That gives me a nice spray pattern up close for high deflection snapshots and the precision to snipe out to 1200 yards with 0.50 cal. and 20 mm Hispano, or at least score useful hits at 650 yards with any axis weapons available.
Most average and lesser skilled pilots seem to think people can't hit anything beyond 500 yards and unload to recover energy or run outside of that range. I don't use tracers and know the angles very well for hitting out to 1200 yards with Allied weapons, principally the 0.50 cals. Anyone who flies straight inside of 1000 yards me for any length of time is going to lose control surfaces for sure, possibly get killed by a golden bb.
Ace pilots make my skills look silly

But I have killed some ace pilots that were otherwise far better than me, because when I follow their rope-a-dope move, I get off a good long range burst into their zooming aircraft before my P-51, P-38, or F4U-1D stalls. I love it when I can punish a Bf109G10 pilot that is otherwise outflying me

Of course, not being able to practice much and not being especially good to begin with, I usually can't get the shot lined up before I stall... and I get roped by anyone who knows what their doing. On the other hand, during those few short timeframes where I had my gunnery skills honed, I usually hit anybody that passed in front of me at any range ballistically feasible. With that level of proficiency, I feared nothing while flying a P-51, P-38, or F4U-1D as long as I had the energy to pull my nose onto the target for even a split second. The F4U is notably superior for head-ons, because you can offset to avoid the ho, but at the last moment use that mongo rudder to pivot toward the enemy and rake him nose to tail from ungodly slip angles (much like Werner Voss did in WWI). The 0.50 cal is exceptional for this style of shooting and will always be my preferred weapon in a game like AH that models its capabilities to full effect.