The first bachelor parties goes were as early as the 5th century B.C. where ancient Spartans were the first to celebrate the groom's last night as a single man.
Spartan soldiers held a dinner in their friend's honor and made toasts on his behalf — with, one assumes, a Spartan sense of decorum.
Since then, the events have generally grown more raucous.

In the past, a bachelor party could commonly involve a black-tie dinner hosted by the groom's father, with toasts to the groom and the bride.
The traditions of hazing, humiliation and debauchery — often consuming entire weekends and involving travel to an exotic destination such as Las Vegas or its nearest available facsimile — became a staple of bad '80s sex comedies. (The 1984 Tom Hanks vehicle Bachelor Party hit the genre's perfecta, featuring beer, drugs, strippers, an ill-fated donkey and MTV video vixen Tawny Kitaen.)
Modern bachelor parties are diverse, ranging from Las Vegas trips (losing teeth, dignity and sometimes the groom, as in The Hangover) to a casual party with friends and/or the fiancée. The event is an important step in saying goodbye to one's single life and relieving prewedding jitters. There doesn't even have to be a party: some men now opt for "groom's showers," in which they acquire their own dowry of football tables and power tools.
Girl Power

Prior to the late 19th century, women were limited to bridal showers, the main function of which was to acquire a dowry and gifts to prepare them for marriage. The name may derive from the custom in Victorian times for the presents to be put inside a parasol, which when opened would "shower" the bride-to-be with gifts.
By the sexual revolution of the 1960s, women had launched their own version of the prewedding festivities: the bachelorette party or hen night in the UK.
Bachelorette parties are every bit as diverse as men's and often involve the "hen" wearing a pink sash (and "L" plates) and all the "chicks" wearing similar outfits or even identical t-shirts with witty slogans. They may be themed, for example: Butler in the buff, It's a Knockout, Spa day and even Medieval Jousting with proper knights in shining armour.
Combined Dos
Other couples, uncomfortable with the expectations of debauchery, celebrate their last night together in combined stag and doe parties — an idea that's grown popular as more couples live together and marry later in life. These are known variously as "Sten" or Hag do's in the UK, both combinations Stag and Hen.
via GIPHY