I've heard that the word is Yiddish and comes from the two words "mon" (poppy seed) and "tash" (pocket). Thus it would mean "a pocket of dough filled with poppy seed." Perhaps the letter "heh" at the beginning is to make the food sound like the evil, Amalekite, Haman, who we are wiping out and "consuming."
The connection between Hamantaschen and Purim may be as follows:
Compared to the spectacular miracles we recount on the night of Passover, the events of Purim appear unspectacular. Esther wins the beauty contest - well, somebody had to win. Mordechai overhears a plot to kill the king - was that a miracle? Only when you read the "whole Megilla" do you discover that each event was a hidden miracle. The very name "Megillat Esther" can mean "Revealing the Hidden." Hamantaschen hint to this hidden aspect of Purim, since the poppy seeds are hidden inside the dough.
Why poppy seeds? The Talmud states that Esther ate seeds while in the palace of King Achashverosh. This enabled her to avoid non-kosher food, yet maintain a healthy appearance. Perhaps the Yiddish word "mon" alludes to this, since the Hebrew word for manna, the miraculous food which sustained the Jewish People for 40 years in the desert, is "mon."
Sources:
- Tractate Megilla 13a.
- Ta'amei HaMinhagim 895.
- Mishneh Berura 695:12.