It seems problematic that Achashverosh gave Haman’s property to Esther since the Mechilta (on Shemos 17:14) says Amalek – of which Haman descended – is to be completely destroyed together with its property, so nobody should ever say they gained from Amalek.
Esther may have been allowed Haman’s property because the Rabbeinu Bachya (on Bishalach) answers that this Mechilta only refers to possessions obtained in the course of war.
In Vedibarta Bam, Rabbi Bogamilsky points out from the Talmud (Sanhedrin 48b) that such property actually belongs to Achashverosh.
Similarly, the Talmud (Gittin 38a) teaches that the Jews were allowed the possessions of Moav and Amon because Sichon had already conquered them previously.
Given that Esther was allowed Haman’s property, the Alshich writes that Achashverosh gave it to her because the kingdom did not need Haman’s house, after all. This is especially true if Haman destroyed his own home by utilizing its crossbeam in the building of his gallows.
The Alshich adds that the decree to kill out the Jews had not yet been revoked, and Achashverosh wanted to show that Esther and Mordechai were exempt.
On the other hand, the Yad HaMelech says that the king did this so that those who knew of the decree would not harm the Jews, effectively annulling the decree.
The M’nos HaLevi explains that Achashverosh gave her the property to reassure Esther, that although she had seen him angry that day, the anger was not directed at her.
The Malbim writes that this was Haman’s property, which should belong to Achashverosh after his rebellious behavior. However, in a continued effort to salvage his honor, Achashverosh wanted to show that Haman was really going against the queen and her people. Accordingly, the verse emphasizes that Haman was the tzorer (“antagonizer”) of the Yehudim.
The Ginzei HaMelech explains that Achashverosh’s main concern was his security, especially around Haman’s presumed allies. He therefore said Haman tried to seduce the queen, and therefore owed her money. A similar incident occurred when Avimelech took Sarah, and then gave Avraham money (Bireishis 20:14) as a testament of Sarah’s virtue.
The Vilna Gaon quotes a verse (Koheles 2:26) that a person who deserves H-Shem’s Pleasure receives wisdom, intelligent, and joy, but a sinner must constantly accumulate. The Talmud (Megillah 10b) says that this verse applies to Mordechai because the wicked Haman accrued the very wealth through which the righteous prospered.
The Maharal asks why the righteous should prosper from the efforts of the wicked. After all, should the righteous not prosper from their own efforts? He answers that the wicked work and work tirelessly to gain more wealth because they are never satisfied. The righteous are easily satisfied, so they do not have to go through the grunt work of acquiring wealth.
R’ Dovid Feinstein explains this as yet another example of mida kineged mida “measure for measure” because Haman wanted to take what was most precious to Esther – the lives of her people. Therefore, he lost what was most precious to him – his money.
The Me’am Loez says that another example of mida kineged mida is that since Haman wanted to hang Mordechai in his house, Haman’s hanging occurred in what is now Mordechai’s house.
Rebbetzin Tzipporah Heller adds that Achashverosh took the property because Haman was Mordechai’s slave. According to Jewish law, the property always really belonged to Haman’s master, Mordechai. With the property comes Haman’s identity. She suggests that taking over someone’s identity is another reason for the custom to masquerade on Purim.