This is one of the areas of the Pacific War where the Japanese ran a far second from the US AA capability. And when I say AA capability, I not only mean what amount and the accuracy of shells that could be put into the air, but also the effects of these shells upon enemy planes, causing the durability of planes or lack of to be part of the equation. I'll stay away from CAP capabilities, but to address it rather quickly Japan did not have the organization of US CAP, largely due to US radar superiority, being able to get altitudes of incoming formations earlier, radio control or lack of,all these combining to make it difficult to vector the right amount of CAP to the right place at the right time. Put simply, better control of CAP would have allowed Japanese fighters to attack the Dive Bombers at Midway, which likely would have had a major bearing on that battle.
Anyway, Back to the AA differential:
1) Heavy AA - The US used the 5"/38 for the most part is it's heavy AA weapon. Best dual purpose weapon of the war. Good training/elevation speeds, a robust projectile, a power rammer that allowed it to be loaded at high levels of elevation and cut down on crew fatigue, and a very high rate of fire, 15-22 Rounds per minute if it had an internal hoist (many, but not all mountings had internal hoists). Add to this later radar directed fire, and it was easily the best AA medium caliber naval gun of the war. Of course, than you have to throw on the proximity fuse. Even with a moderately high "dud" rate compared to standard fusing, it still at least doubled the effectiveness of these weapons.
Japanese Heavy AA - A range of guns performed this role. The Destroyer mounted 5"/50 has perhaps the worst. Horrid training/elevation rates, a capped elevation rate as low as 40 degrees in some models, no power ramming, a rate of fire of about 10 rpm. While as a surface weapon it was roughly equivalent to the US 5"/38, even superior as a surface weapon in some ways, as a AA weapon it was terrible. Perhaps the term "dual purpose" barely applies to this weapon.
The other common Japanese Heavy AA weapons, the 5"/45 and the 4.7"/40 were OK, but rather unremarkable. They had a slower train/elevation than the US weapon and a lower rate of fire. Add to this a lack of a proximity fuse and inferior radar fire control, and it was easily outclassed by the US weapon.
The one Japanese weapon that indeed was effective as an AA weapon was the 3.9"/60. High train/elevation speeds, rate of fire equal to the US 5"/38. A slightly small shell of course, but a very good weapon. Only thing that prevented it from being as good as the US 5"/38 was inferior radar fire control and lack of a proximity fuse. Unfortunately for the Japanese, these guns were somewhat uncommon in comparison to other AA weapons.
2) Light AA - I'm going to leave out the various machine guns and only focus on 20mm or greater weapons.
Really the only Japanese light AA weapon of the war was the much maligned 25mm/60. Strictly as a gun only, it seemed to be fine. It had a good muzzle velocity and a maximum rate of fire in the 240 range. Unforunately there were other problems. It's loading system lowered it's effective rate of fire to 110rpm - a belt fed or feeding system similar to the 40mm bofors would have helped. It's 3 barreled mounts shook excessively, I'd think this was a problem with the mount, not the gun, the mount not being substantial enough. Might have had something to do with the Japanese tying to put as many 25mm's on a ship as possible. Overall though, because of the problems listed above, and adding this to a low train/elevation speed on the triple mounts and a sub par sighting system and it was not overly effective.
US light AA - We have the 20mm Oerlikon, the 1.1"/75, and the 40mm Bofors. The Bofors was the best light AA weapon of the war, delivering a large 40mm projectile with a 120-160 ROF. THe Oerlikon was a nice weapon too, a 250-320 practical ROF. By the end of the war these were not great against kamikazes, and were replaced when possible with the 40mm Bofors. The US 1.1" was discarded early in favor of the Oerlikon. Seemed like a decent weapon that was discarded ealry, it's effective rate of fire was not great at 100 rounds per minute, and apparently it's fire director was not on par with later fire directors, but that I htink would have been a problem with any AA weapon at that early time of the war.
3) Radar - Japan usually seemed to be roughly about 2 years behind the US when it came to radar during the war, which is a lifetime for wartime technology, as the P47 entered production only about 2 years after the P40. The Japanese even had radar controlled fire directors for main naval weapons before the end of the war, though true "blindfire" fire direction was in the experimental stage. But this meant that the US always had a nice edge in radar technology for fire direction, and Japan never developed anything similar to the proximity fuse.
4) Plane Durability - A huge advantage to the US. Rather simple to state, the Japanese generally did not have self sealing fuel tanks until late in the war, I don't think any of their carrier based strike aircraft ever had self sealing fuel tanks or armor, deeming range much more important. In comparison, I think almost all US carrier based aircraft had armor and self sealing fuel tanks even at the outset of the war.
What is interesting about this is that looking at the first part of the war, the carrier battles of Croal Sea, Midway and Santa Cruz, the Japanese would suffer more casualties than the US. This is even though their pilots were arguably better during this time period, and the Zero was considered superior to the Wildcat in air-to-air combat.
Combine this with the Japanese very slow rate of pilot replentishment, and it's pretty clear why during the Marianas battle the Japanese were no match at all for the US in Carrier clashes. I think it would have made far more sense for the Japanese to focus less on range and more on pilot survival.