The most common legend is that Shen Nong (literally means "Divine Farmer"), also known as inventor of agriculture and Chinese medicine, discovered tea by accident in 2737 BC.  One day when he was enjoying his water that was just boil. (He believed boiled water is safer to drink and also increase longevity) Suddenly, the leaves of a tea plant fell into his cup. He tried it and liked the resulting beverage so much that tea was born. 
Tea has integrated into different cultures around the world for over 1,500 years. Today tea is by far the 2nd most consumed beverage in the world. (1st is water) It almost became a trend to see newly opened tea shops around the corner everywhere.
The oldest known Sweet Iced Tea recipe was published in 1879 by Marion Cabell Tyree. Due to the heat, sweet iced tea is particularly popular in the South (of USA) and it usually comes in a pitcher for quick refill.  The drink was quickly promoted and became well-known throughout North America from being the best drink for the hot summer during the 1904 St. Louis World’s Fair. 
According to Tyree’s recipe, she used green tea in her sweet iced tea.  See recipe below:
"Ice Tea. - After scalding the teapot, put into it one quart of boiling water and two teaspoonfuls green tea. If wanted for supper, do this at breakfast. At dinner time, strain, without stirring, through a tea strainer into a pitcher. Let it stand till tea time and pour into decanters, leaving the sediment in the bottom of the pitcher. Fill the goblets with ice, put two teaspoonfuls granulated sugar in each, and pour the tea over the ice and sugar. A squeeze of lemon will make this delicious and healthful, as it will correct the astringent tendency."
However, more black tea recipes were used because of the inexpensive exports from India, Ceylon, South America, and Africa. During World War II, the major sources of green tea were cut off from the US due to anti-Japanese sentiment at the time and black tea became the dominant tea for Americans. 
Tea drinking was likely to begin during the Shang Dynasty (1600 BC–1046 BC) in Yunnan, China for medicinal purposes. The first recorded drinking of tea was dated back to the 10th century BC China. The first tea monograph was written by a Chinese writer, Lu Yu, during the Tang dynasty around 760 CE. The book was called The Classic of Tea ("Chajing" in Chinese) and it introduces tea drinking in ten chapters. 
Tea was first introduced to Portuguese priests and merchants in China during the 16th century CE. Catherine of Braganza (a Portuguese princess), wife of King Charles II of England, took the tea habit to Great Britain around 1660, but tea was not widely consumed in Britain until the 18th century. In the beginning, tea was a luxury item only for special occasions, such as religious festivals, wakes, and domestic work gatherings such as quiltings.
In Britain and Ireland, tea had become an everyday beverage for all levels of society by the late 19th century when Indian tea began to arrive Europe in large quantities.
Photo by nagualdesign
Sweet Iced Tea was and still a common drink for most Americans. Over time this tea had been popularized and manufactured worldwide from large tea brands and companies. Sweet Iced Tea's recipe can be as simple as it sounds: add sweetener and ice into tea. Other types of variety can be mixed with fruits such as lemon, orange, and pineapple. Sometimes people add a little bit of baking soda to take bitterness out of the black tea.