It certainly could be effective in the right circumstances; Hans-Ulrich Rudel was credited with over 500 tank kills, mostly while flying the Ju 87G, though he was a rather exceptional case (further reading: Stuka Pilot, his autobiography). It is difficult to verify tank kills from aircraft, though; see, for example, this thread looking at numerous sources for specific encounters during the Battle of Kursk.
The main problem with the Stuka was that it was terribly vulnerable, arguably obsolescent in 1940 (John Terraine, The Right of the Line) let alone by 1943 when the G variant went into service, but the lack of an alternative kept it in production until the end of the war. The Henschel Hs 129 should have been the main "tank buster" of the Luftwaffe but never fulfilled its potential, leading to the Stuka being fitted with the Bordkanone 3,7 in the first place.
There were several other WW2 aircraft with large calibre guns; Tony Williams summarises most of them in Tankbusters: Airborne Anti-Tank Guns in WW2. Specifically looking at large calibre guns in under-wing pods there are two notable examples. Firstly a variant of the Ilyushin Il-2 with an NS-37 cannon under each wing, but it wasn't very successful, better results were obtained using shaped-charge bomblets to attack armoured vehicles. Secondly, and probably the closest Allied equivalent to the Ju 87G, the Hawker Hurricane IID was fitted with a 40mm Vickers 'S' gun in a pod under each wing, earning the affectionate nickname of "the tin-opener" (Adrian Stewart, They Flew Hurricanes). The Hurricane IID, and subsequent Mark IV that could be fitted with either bombs, rockets or the 'S' guns, were fairly successful in North Africa and the Far East, but like the Stuka were rather outdated by 1942, performance further hampered by the bulky guns.