The myth of poor US armor is exactly that, a myth.
Reality is the M4 was arguably the best tank of the war, it proved itself against Axis armor during the war, and against its rival the T34 in several later wars Korea in particular. There were numerous examples of M4s defeating Panthers and Tigers in single combat. The M4 had excellent armor (better than the early T34) and the German's did not consider them to be easy targets. It wasn't until the fighting in Normandy that the M4 suddenly became a "death trap". The Bocage was terrible tank country, and any tank leading an offensive there would have suffered heavily. The stories about it being highly flammable have been disproven, and in fact part of that myth actually comes from its great durability. German crews got tired of seeing the same tanks that they knocked out the day before coming at them again, so it became common practice to continue firing on them until they caught fire.
The M4 was such a turd, that it remained in US service until 1957, 12 years after WW2 ended. Isreal continued to use upgraded M4s until the early 1990s 50 years after the tank first saw combat.
The M3 was a very good light tank when first deployed. Most light tanks of the late 1930s to 1940 were armed with machineguns or 20mm cannon. The M3 was armed with a proper anti-tank gun with the 37mm. In 1940 37 and 40mm (British 2 pounder) anti-tank guns were standard issue for all major militaries. It wasn't until 1941-42 that the larger 45mm (USSR), 5cm (Germany) and 57mm (UK, USA) began to enter service. In 1942 North Africa US M3s were at a disadvantage, but remained a capable threat and accounted for many German Panzer 3 and 4 medium tank losses.
Technology advances were rapid during the war, some early war tanks Panzer 3/4, M4, T-34, Churchill were capable of being upgraded to keep pace, many others including the M3/M5 became outdated a few years into the war.
As mentioned in several posts above, as infantry support an M3/M5 (and also M8 armored cars) armed with a 37mm gun and several machineguns was a welcome sight. The 37mm gun which had both HE and cannister rounds available could do a great job of taking out a dug in machinegun, infantry holed up in a building or a sniper concealed in a structure. A 37mm round is fairly small but it has a lot more punch than most infantry weapons except for a mortar or bazooka. Being mouted in a light armored vehicle it had far better protection and mobility than any crew served infantry weapon. The 37mm remained adequate to do the job on most light enemy armor (half tracks, armored cars and light tanks) through the end of the war.
The US made a lot of tanks, more than 22,000 M3/M5 and 50,000 M4 tanks were built during the war, compared to around 5000 Panzer 3, 8000 Panzer 4, 6000 Panther, 1300 Tiger I and 500 Tiger II (more M3 built than all major German medium and heavy tanks combined).
M3 might not have been a jugernaut of a tank, but through shear numbers it meant US infantry usually had tank support available where German infantry often did not.