Berets of the United States Army
U.S. Army Special Forces wear the green beret because of their link to the British Commandos of World War II. The first Ranger unit, commonly known as Darby's Rangers, was formed in Northern Ireland during the summer of 1942. On completion of training at the Commando Training Depot at Achnacarry Castle in Scotland, those Rangers had the right to wear the British Commando green beret, but it was not part of the regulation uniform at the time and was disallowed by the U.S. Army. 
The 10th Special Forces Group (Airborne) had many veterans of World War II and Korea in its ranks when it was formed in 1952. Members of the 10th SFG began to unofficially wear a variety of berets while training, some favoring the red or maroon airborne beret, the black beret, or the green commando beret. In 1953, a beret whose design was based on that of the Canadian Army pattern, and which was rifle-green in color, was chosen for wear by Special Forces units.
Charles Alvin Beckwith
Meanwhile, as the 7th SFG(A) operations officer, Beckwith went to work revolutionizing Green Beret training. Special Forces at the time focused on unconventional warfare, and especially foreign internal defense: i.e. training indigenous personnel in resistance activities. But Beckwith recognized that, "Before a Special Forces Green Beret soldier could become a good "un"conventional soldier, he'd first have to be a good conventional one... Because I had commanded rifle and weapons companies, I was appalled on arriving in Special Forces to find officers who had never commanded conventional units." Beckwith restructured 7th's training, basically rewriting the book on Army special operations training from the real-world lessons he had learned with the SAS. Beckwith also had learned that a symbol of excellence like a beret had to be earned. Officers were being assigned to Special Forces straight out of war college with no prior special ops experience and were given their Green Beret on arrival. The hard-nosed and practical training standards that Beckwith instituted would lend themselves to the birth of the modern Q-Course.