ah the good ol' m16 vs ak47 debate...
the reason why the ak47 is so successful is its simple design, function and cheap price tag. But as a modern battle rifle it has major flaws.
The AK47 has only one real tactical advantage over its modern counterparts. That is in urban firefights where the shere firepower of the 7.62x39 round leaves only few covers in which one is safe. It can penetrate most things in an urban setting, like doors, walls, car doors etc. Furthermore, some claim the sound of an AK47 fired in urban settings can confuse you and make it more difficult to locate the shooter. I'm looking into that...furthermore, the short engagement distance plays down the range issue and to some extent the accuracy issue as well.
Unfortunately, poor training of people like some of the mentioned Iraqi insurgents, african insurgents etc. is damaging the reputation of the AK47 and is costing these people their lives. Spraying bullets rarely if ever hits anything other than by chance. If they did some simple math they would realize that sticking to aimed single shots would greatly increase their hit probability.
Modern M16s are more reliable, have more stopping power due to new rounds are more accurate, and are better built than earlier versions. Downside as many of you mentioned is the price tag, and stopping power. The stopping power has been attempted solved by using a larger caliber like the 6.5mm but is not very common. It seems though that basically all new rifles are still based on the 5.56x45mm although on the ss109 bullet which is highly accurate and has more stopping power than the older 5.56x45mm bullets, the argument is that the soldier keeps on gaining weight in terms of more gear, and armor, and the rifle still needs to be light weight and the soldiers need to carry a lot of ammo. Instead of one shot one kill, the soldiers aim at achieving more successive hits on target which is made easier with an accurate rifle with good optics.