The first dance is an element in a number of traditions, being an opening of a certain dance function: ball, prom, wedding, etc.
In the context of balls, the term "first dance" has two meanings.
At various formal balls the first dance was led by the guest of honor, which was usually the person of the highest social position in a given context, such as a member of the royal family, if any were present. Their dance was the opening of the ball. As these were generally long country dances, the guests of honor would be the first people to go down the set, not the only two people dancing for the entirety of the first piece of music.
In 17th-century France, the minuet, also called "the Queen of Dances", was the first dance.
In the Victorian era of Great Britain the first dance was a quadrille.
In 19th century Russian Empire balls were opened with Polonaise. 
Another meaning is the first occurrence of a young lady in a social gathering. It could have happened either during a usual ball or during a specially arranged debutante ball or cotillion.
The "first dance" of a married couple is a popular element at modern European and American wedding receptions or post-wedding celebrations. The newly married couple, as the guests of honor at a dance, open the dancing. The style of dance is a personal choice. Some couples opt for a rehearsed, choreographed dance, whereas sources like etiquette columnist Judith Martin feel that performing a choreographed duet for spectators is inappropriate.
In the past, the couple did not dance the first dance alone. In her 1922 guide, Etiquette, Emily Post recommended that newlyweds not join the dancing until after their guests had begun, and simply dance with one another first before moving on to other partners. This occurred while other guests continued dancing, and was not given particular attention or treated as a performance.
In the current times, ballroom dance is not a skill that is common within society. Therefore, some modern couples either slow dance or learn a dance, whether it be a ballroom dance style or a choreographed dance routine. The music to which they dance is also highly varied, with modern chart hits often being selected. Teaching and rehearsing the "first dance" is now a service offered by dance studios, independent dance instructors and specialist wedding dance tuition companies.
Today, in modern day, the phrase "to open the ball" has become a figure of speech for initiating an activity which will be subsequently continued by others. The term has been used in descriptions of battle scenes.