According to the RPG weapons rules, a standard infantry rifle round (from a 31st Century high-tech weapon) does a point of damage to 'Mech armor on a roll of 11+, if I recall. That means, you've got to score an average of 12 hits for each point of damage (each hit having a 1:12 chance of doing damage). With automatic weapons being fired by an entire platoon of grunts, that very roughly adds up to the several points of damage that a rifle platoon inflicts.
That was several generations ago. Under current RPG rules, the ability to damage battlefield armor is based on the armor penetration and the personal scale damage of the weapon, and is compared to the barrier armor rating of the target. First, the damage is reduced by the Barrier armor rating (minus the armor penetration of the weapon), then that modified damage value is divided by the unit's barrier armor rating (this time not taking into account the AP of the weapon). The result is rounded to the nearest whole number, and the result is the final damage.
For example, a battlemech's armor is Barrier armor rating 10. An autorifle has a base AP and Damage of 4. Thus a single shot will almost never* be able to hit hard enough to damage mech armor. However, an autorifle also has the burst 15 property, which allows you to fire up to 15 shots at a penalty for recoil. If you do so, then you gain an additional point of base damage for every point by which your roll exceeded the target number to hit, up to the number of shots you fired.
As such, if you hit a battlemech with a margin of success of seven, you will inflict a point of damage to the armor (inflicting 4 points of personal damage plus 7 points for burst fire, with an AP of 4. BAR 10 minus AP 4 means the eleven points is reduced by 6, leaving five points remaining. Those 5 points divided by the BAR of 10, resulting in 0.5, which rounds up to a single point of damage.)
*I say almost never because when firing a single shot you gain an additional point of personal damage for every four points you exceed the margin of success, thus you could theoretically damage mech armor if you beat the target number by 28, which is only practically impossible. My ideas of how infantry should interact with mechs are a bit too complicated to get into here, however if one wanted to simulate the A Time of War mechanics for their weapons, I'd apply an additional modifier to the target number to account for the margin of success necessary to damage the armor.