As part of dressing in costume on Purim is a person allowed to put on clothes normally worn by the opposite gender? If so, where does this heter come from in the face of the biblical prohibition against cross-dressing in Deuteronomy 22:5?
This prohibition is intended to prevent licentious behavior. The question remains, however, whether this prohibition applies to Purim, a day when any cross-dressing would only be for "harmless" entertainment purposes. The Rama, Orach Chaim 696:8, mentions two opposite opinions on this question: 1. There is no prohibition. 2. It is prohibited. He then says that the custom is to follow the first, more lenient, opinion.
The Mishnah Berurah (halachic code authored by Rabbi Israel Meir Kagan (1838-1933)) cites (The Taz, in his glosses to Yoreh De'ah sec. 182, the Bach, the Shalah, and others) who recommend that the custom of Purim cross-dressing be abolished and prohibit this practice. Likewise, as far as I can see, the overwhelming preponderance of later rabbis who discuss this issue in their responsa (Yabiah Omer, Yechaveh Daat, and others) is to prohibit the practice, citing other earlier authorities who call it "wicked."
Summary: Mahari Mintz writes that although it is usually forbidden to dress as the opposite gender, it is permitted in the context of the Purim celebration. (It seems, though, that he is trying to rationalize a behavior he has seen as being accepted.)
However, several earlier rishonim write that it is forbidden to cross-dress under any circumstances. Thus, R' Ovadia Yosef rules that it is forbidden even on Purim.
Yalkut Yosef (pocket-size Moadim pg. 494. See Yabia Omer 5:14 Y"D and Yehave Daat 5:50) prohibits any cross-dressing on Purim (and certainly year-round).
Not surprisingly, it is a Machlokes.. See http://doseofhalacha.blogspot.co.uk/2013/02/lets-dress-up.html The earliest source (14th Century) noting it was the Even Bochan. The Rema paskens lekula - allowing it.