People belonging to the Indus Valley Civilization were the earliest to use Buttons, but they were more of an ornament or decoration rather than a normal button. These were mostly made out of stones, shell or metals like copper or Iron.
Then came the roman era, where buttons were used just like Brooches or Pins, to fasten loose and flowing clothes like a toga.
Functional buttons with buttonholes for fastening or closing clothes appeared first in Germany in the 13th century. They became widespread with the rise of snug-fitting garments in 13th- and 14th-century Europe. This didn't mean clothes were cut more sparingly; wealthy people still liked the costly display of excess fabric. Buttons were used to accentuate the curves of the body. e.g. Arms of a man or the bosom of a woman.
The First Button Makers Guild was formed in 1250 AD. The guild produced magnificent buttons, but were only worn by the wealthy. In fact, there were actually laws passed which forbade the common person from owning any button other than thread or cloth covered ones (It's not like they could afford the costly ones anyway). There even exists an episode where tale, a magistrate quizzed a woman overly bedecked in buttons. It was a maniacal fashion trend among the rich to own dresses with unique and exotically-designed buttons. In some cases, buttons covered most of the garment. And each button had its own button hole! Imagine how much work and time it could take to dress oneself!
In the 16th Century, A French king had 13,400 Gold buttons made for a special outfit for his meeting with an English king! Around this era is when buttons migrated to different sides of a shirt for men and women. Men usually donned their own shirts, so their buttons faced right for their convenience. Women with ladies’ maids wore their buttons on the left, to make it easier for the maids to maneuver while facing them.
In the 17th century, the first duke of Buckingham had a suit which consisted of buttons made of Diamonds.
In 1802, Abel Porter established a company in the United States that began making metal buttons. He saw an opportunity for big business as the imported ones were scarce and expensive. This company became the famous Scovill Manufacturing Co.
By the turn of the 20th Century, picture and novelty buttons were very much the fashion. Picturesque buttons for men's waistcoats were very popular. Animals and hunting scenes were vastly produced for this purpose. Many collectors adore them. With the introduction of plastics, buttons weren't quite so precious anymore.
Sources and References: Books, Banks, Buttons: And Other Inventions from the Middle Ages: Chiara Frugoni, William McCuaig: 9780231128131: Amazon.com: Books, The Button: A Visual History of the World’s Sexiest Fastening, LEARN THE HISTORY OF MOTHER OF PEARL BUTTON JEWELRY, Button