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.
United States Army Special Forces in popular culture
Members of the U.S. Army Special Forces will emphatically assert that the "Green Beret" is a hat and not the man who wears it. Nevertheless, for a time in the 1960s the Green Berets and the men who wore them became a national fad emerging in a wide variety of popular culture referents. After a decline in popularity during the 1970s — coinciding with the American public's backlash against the Vietnam War — the Green Berets gripped the popular imagination again beginning with the Rambo film franchise in 1982. They continue to appear as both major and minor referents in popular culture — especially in movies and television — often serving as a shorthand signifier for a shady or covert military background for a fictional character. As a dramatic device, this can cut both ways — i.e., lead an audience to either admire or fear (or both) a character.