I'm asking about why America made the m16 and the Soviet Union made the ak47. Like what was the major need for these new guns?
Before World War Two, you had two primary types of infantry small arms. Rifles, which had made up the primary small arms of European armies since the mid-19th century, were probably the most common weapon. They were long weapons which were intended for medium and long range fire. On an open battlefield, their length wasnt an issue. But during World War One, these weapons were often found to be too unwieldy for use in confined spaces, like trench networks. A new kind of weapon was developed, and continued to develop during the Interwar period. These weapons, called sub-machine guns, were small automatic guns. Instead of the large cartridges fired by rifles, these weapons fired something smaller, closer to pistol rounds. And with their short barrels, they were unsuited for long range combat. But up close, say in a trench or in a building SMGs were quite effective. This was especially true when mixed with other kinds of weapons, like pistols and grenades. I like the pictures I liked to you of the Russian soldier with the PPSH, which I think illustrates the need for many kinds of weapons in close-in fighting.
But both traditional rifles and SMGs proved unsatisfactory. That is to say, once a rifleman moved into an enemy's defensive position, say a trench, a house, or some other close environment, he was at a disadvantage. Likewise, once a sub-machine gunner moved outside of tight confines, he was at a disadvantage compared to rifle-armed troops.
This problem was solved thanks to crafty weapons designers late in the war. The so called 'assault rifle' combined the larger cartridge, barrel, and thus long range capabilities of a rifle with the shorter form and automatic fire of an SMG. These assault rifles were good in both close quarters fighting as well as in more open environments.
And, for the purposes of your question, this is probably the biggest development in small arms since World War Two. Both the M-16 and the AK-47 were the US and the USSR's response to the development of the assault rifle in World War Two. They represented a shift away from traditional rifles and longer range fire towards more flexible rifles which could operate in a variety of conditions. This shift away from the rifle wasnt an instant process. Many of these weapons in their early stages were unreliable, heavy, and awkward. But in the twenty years following World War Two, the 'kinks' were worked out of the designs, and they were accepted (especially in the case of the Kalashnikov) by the majority of the worlds armies.
But they werent the only major developments to happen to infantry weapons during the Cold War. You see the development of a whole host of new kinds of weapons, from light and portable grenade launchers, to the development of accurate, guided, anti-tank missiles. The general trend in the Cold War was away from the bulky and heavy equipment of World War Two towards light, small, highly effective weapons. But you also see the invention of completely new weapons systems, from anti-aircraft missiles which a soldier could carry on his shoulder, to the Davy Crockett, a crew served nuclear weapon which could be placed in the bed of a truck or jeep.