While feasting and intoxication on the holiday of Purim are discussed in the Talmud, costumes are not. Yet dressing up has been a standard practice for centuries. Shlomo Brody looks at its origins:
Purim costumes originated as a medieval folk custom in Ashkenazi lands, leaving rabbinic scholars to discuss the propriety of the practice. One prominent discussion was written by a 15th-century German scholar who had moved to Padua. He permitted the wearing of masks, despite the opposition of some earlier figures, and even justified men and women wearing clothing of the opposite gender, despite the biblical prohibition of cross-dressing. . . .
Where does the practice of dressing up come from? Some have speculated that it commemorates how Mordecai was dressed in regal clothing, a clear turning point in the plot of the Purim story. Others believe that hiding one’s identity symbolizes how God’s hand was involved in the miraculous salvation, even though His name is never explicitly mentioned in the text of the story. Noting that Esther similarly hid her own identity, Zohar Hanegbi further contends that perhaps the intention is to mimic the many costume parties in the story. Whatever its commemorative message might be, several rabbis and historians have claimed that this folk custom imitated medieval European Christian carnivals (e.g., Fastnacht or Mardi Gras) which took place at around the same season. If true, this would be akin to the development of the contemporary American custom of Hanukkah presents during the “holiday season.”
Still, many have had reservations. The 17th-century Italian scholar Shmuel Abuhab viewed the wearing of costumes as a form of debauchery that detracted from the religious joy that one should feel on the holiday. Some particularly discouraged the pious from donning costumes, while others, like Rabbi Ovadiah Yosef, banned cross-dressing for all.
Read more on Tablet: http://tabletmag.com/scroll/189349/the-origins-of-your-favorite-purim-customs