The generally accepted explanation for the costumes we wear on Purim is (Rama OC 696:8) that the Miracle of Purim was not through mighty and obvious changes in nature, through nissim niglim. Instead, God operated behind the 'mask' of nature, and accomplished, through hidden manipulation of natural events, as great a miracle as the splitting of the Red Sea. So we, too, wear masks, to symbolize that "hester panim," the "hidden face." This theme resonates throughout the Megilla, with Esther (Esther/hester, Chullin 139b) hiding her ethnicity, and Mordechai changing his clothing from the glorious vestments of a royal favorite to mourner's sackcloth and back.
And then there is the "mah yafis" poppycock that it stems from mimicry of Christian festivals. In fact, of course the minhag far predated the Venetian Mardi Gras the above alludes to. In Maseches Purim, written by R. Kallonymus ben Kallonymus (1286-1328), he writes ובארבעה עשר לחודש אדר, בחורי ישראל לכבוד ולהדר... זה ילבש שמלת אשה ולגרגרותיו ענקים... וזה יתחקה כאחד הרקים תף ומחול שמחה ושלישים. אלו עם אלו אנשים עם נשים... (Thank you to Eliezer Brodt in the Seforim Blog for the reference.) (please see end of post for a brief discussion of Cultural Diffusion.)
Those are the explanations that you may have heard. Now, here is an excellent explanation you did not know.
I have a friend, Rabbi Leibel Schwartz, (who, on Purim, should be referred to as “Black Leibel”-- Schwartz=Black,) who was rushing to get his wife to the doctor because she had a high fever and was having trouble breathing. Unfortunately, in his hurry he mis-stepped and fell down the stairs. He broke four ribs and collapsed a lung, and was in a great deal of pain. Next time you inhale, think about four cracked ribs grinding against each other with each breath. Anyway, when we found out about it at our shiur, we called him, and one member of the shiur, who shall remain nameless, told him that our call reminded him of the story about the President of a shul who called his rabbi who had been hospitalized. The Shul President told his Rabbi that the board of directors had voted eleven to nine to wish him a speedy recovery. Telling a joke like that to a man with four broken ribs and a collapsed lung is not a laughing matter. But it was funny anyway, and speaks volumes about the people who come to my shiur.
When I visited him, Leibel showed me a sefer from his grandfather’s uncle, Tshuvos Eirech Shai, from the Dayan of Siget. (Or, Sighet; the town where Eli Weisel was born, which has been said variously as having been in Romania, Hungary, the Ukraine, and Transylvania.) In the section on Orach Chaim, he has remarks on Shulchan Aruch. On Siman 570, in the Laws of Chanuka, he discusses the Taz’s question about why there is no minhag to have special festive meals on Chanukah. The Taz distinguishes between redemption from spiritual threat, which should be commemorated with religious ceremonies, and redemption from existential threat, which should be commemorated with festive meals. The Dayan suggests another answer.
He brings from his book on the Chumash that Yitzchak wanted to save his son, Eisav, from his impending spiritual self-destruction. When Yitzchok told Eisav “sah nah tel’yicha” (pick up the weapons that hang at your side) it was a hint that he hoped to save Haman, Eisav’s descendant, from being hanged. Certainly, a blessing to Eisav would have empowered him and his descendants with strengths beyond what they would naturally have. But Yaakov made a special festive meal for his father Yitzchak, as Yitzchak had instructed, at which he served wine in order to stimulate Yitzchak's spiritual joy and happiness to enhance the blessings-- ויגש לו ויאכל ויבא לו יין וישת, "and he brought him food and he ate, and he brought him wine and he drank.". In order to mislead his father, Yaakov put on a disguise, a disguise that fooled Yitzchak into thinking he was Eisav! The result of the festive meal and the wine and the disguise was that Yitzchak did not realize that the person in front of him was not Eisav. So this was the first case where a festive meal and a disguise resulted in “D’lo yada bein baruch Mordechai l’arur Haman”!
This is a wonderful new perspective on the seudah and minhagim of Purim; we are not only commemorating the events of Shushan. We are remembering and re-enacting the very first victory of Klal Yisrael over Amaleik, which took place one thousand two hundred years before the story of Megilas Esther occurred. So we make a se’udah, and we serve wine, and we wear disguises, and our disguises might be those of pirates or vampires or Arabs. Costumes that look like a Kohen Gadol or (l'havdil) Spongebob are very nice. But that’s not the idea of Purim. We are commemorating the way Yaakov turned the tables on his nemesis by dressing like him- like Eisav/Amaleik/Haman- and got the brachah from Yitzchak, which ultimately expressed itself in the story of Purim.
Another very valuable point here is that EVEN IF YOU GET DRESSED UP LIKE EISAV, YOU HAVE TO BE SURE THAT THE ‘KOL KOL YAAKOV.” People can drink, and wear absurd costumes, but they better be sure that they act like Yaakov. As they used to say, "Dress like the British, but think in Yiddish." Don't get inebriated: get in-Ivri-ated.
Everyone knows that people have ancestors, and everyone knows that certain ancestral character traits manifest themselves in their descendants. What not everyone realizes is that events have ancestors as well, and the past creates roots that eventually grow into things that happen five hundred, or a thousand years later. And this is true not only for events that happened in ancient times; what we do today will influence our descendants in unimaginable ways. Just as Shem's covering his father, and Avraham's refusal to accept Melech Sdom's money, changed the nature and significance of the mitzvah of Tzitzis, what you do today will have consequences and ramifications until the end of time.
See, also, the Targum Esther 3:6, which goes like this:
Many scholars say that the minhag to wear costumes stems from cultural diffusion; that Jews saw the Venetian masked balls and parties and adapted the concept to our holiday. Whether this has any truth to it is not important to me. Here is a remark I made on the topic on a Jewish news site:
Cultural diffusion only to the extent that a style of celebration was not adopted but instead adapted; not commingled but instead co-opted. It is no different than the minhag of heseiba on Pesach, which was a Greek way of expressing freedom and tranquility at their banquets. Our seder is not at all like a Greek banquet; but we adapted this manner of expressing cheirus. It is no different than using fur hats to express dignity and grandeur. It is no different than standing up for a Chassan and Kallah or using "Italian Lights" for Sukkos in Israel. We adopt/adapt behaviors only when our re-casting serves to emphasize a uniquely Jewish idea. Calling it 'cultural diffusion' creates a false implication of parity, denigrating our minhag by associating it with the louts and hedonists of Venice. When we start carving pumpkins, call me.