All planes seem to be armed with .50 caliber machine guns.
There are a number of advantages from the American perspective to keep using the .50 cal throughout WWII.
Logistical simplicity. Virtually every gun mounted on a frontline American aircraft during the War used the same caliber and basic design. This greatly simplifies providing ammunition and parts, which is a significant advantage.
American air forces primarily dealt with single-engine aircraft in all theaters of the War, and in Europe were by the late War almost exclusively targeting interceptors. The appeal of cannons for the British and Germans lay in their need to effectively dispatch enemy bombers. This led to the Germans developing 30mm and even 50mm airborne cannons. The Americans did have an effective 37mm cannon on the P-39, but the fighter's capabilities weren't attractive to the mission profiles of the Americans, and instead the craft was used mostly by the Soviets who appreciated it.
The Americans also simply lacked a reliable 20mm option for most of the war. A custom version of the Hispano used widely by the British and intended for American use had significant reliability issues (with jamming, if I recall correctly). It nevertheless saw effectively use on the P-38.
When delivered in racks of six and even eight (as on the P-47), the destructive potential of American .50 cal was still quite high. It also provided deeper ammo reserves and a broader angle of fire (even with convergence).
What /u/Aethrelric said.
I'd like to also add that many aircraft that did carry cannon (such as the Messerchmidt Bf109 and later models of Spitfire) carried a mix of armament types, mostly because they couldn't carry many cannon rounds. Cannon rounds being heavy and bulky.
In a fight against a maneuvering target a mixed armament causes lead issues because the projectiles have different ballistic characteristics, especially muzzle velocity. So a pilot might be leading the target enough for the rifle-calibre rounds to hit the target but the cannon rounds are slower and pass behind the target.
So having a homogenous armament gives the advantage that when a pilot does get his weapons on target he's going to hit with all of them at the same time.