The M16 when originally introduced to soldiers as a replacement for the M14 in Vietnam was one of the worst rifles in the world, due to a number of factors, but the biggest one being:
1. Soldiers were not supplied with cleaning kits as the military were convinced that the rifle was so reliable it didn't need to be cleaned. (Yes, I'm dead serious.)
2. At the time the US' smokeless powder was coarse and while it worked fine in the M14 tended to foul up the receiver and bolt, causing stoppages. (cleaning would have helped massively with this)
3. Soldiers weren't trained in how to clean their rifles either.
4. Not totally confirmed, but it seems that a number of manufacturers of poor quality were employed in M16 construction (Soldiers going as far to believe that Mattel made the guns, though this is false)
5. It was a new weapon that the soldiers thought was weak, many of them preferring the M14. Thus they may have been exaggerrating in some cases.
It wasn't long before the US military brass wised up, fixed their smokeless powder chemistry, supplied soldiers with proper cleaning kits, taught them how to clean their rifles, and started fixing known problems with the rifle. After that long process, the reliability issues stopped, although not before the gun garnered a horrible reputation for itself in the first half of the Vietnam war.
These days the M16 is a fine, reliable weapon. Not as reliable as, say, an AKM, but I'd rather have an M16 or M4 carbine than an AK-74. The rifle itself has pretty much everything it needs, save a full auto option (Although this is provided by the M4A1 carbine, which is starting to be issued to "advanced riflemen" as the US military is starting to realize how useless having only semiautomatic and three round burst is in an urban conflict)