According to Rav Dovid Feinstein, Mordechai dressed in sack and ashes because the Talmud (Moed Katan 26a) writes that one should tear one’s clothing when one hears bad tidings.
Yosef Lekach adds that Mordechai’s sensitive emotions allowed him to feel the pain of the potential threat of genocide, that he mourned as if people had already died.
Seeing as nobody was allowed to enter the king’s gate dressed in such a manner (see Esther 4:2 below), the P’dus Yaakov writes that, by doing so, Mordechai was indicating that his rightful place was with the people rather than with the king.
In Pirkei d’Rebbe Eliezer, Mordechai is compared to the king of Ninveh (Yona 3:6), who is praised for immediately donning sack and ash upon hearing that H-Shem planned to destroy his city for their erstwhile evil behavior.
It is possible that, by using ash, Mordechai was invoking the merits of the Jewish forefathers. R’ Elazar of Germiza writes that Mordechai chose ash to recall before H-Shem the merit of our forefather, Avraham. After all, Avraham risked his life to prove the truth of monotheism by being thrown into a flaming furnace. In recognizing H-Shem’s Mercy in saving his life, he later called himself no more than “dust and ash” (Bereishis 18:27). According to the Targum, Mordechai was invoking the merit of another forefather, Yitzchak. Because he laid himself down on an altar dutifully prepared to be slaughtered like a sacrifice by his father (ibid. 22:9), H-Shem credits him with remaining as ash on the sacrificial altar. Finally, Mordechai invoked the merit of Yaakov, who wore sack after the sale of Yosef (ibid. 37:34). The Maharal notes that the verse in Tehillim (20:2) invokes “the G-d of Yaakov” in that fervent prayer for salvation because Yaakov was the forefather whose difficult life deserved more of H-Shem’s Mercy.
R’ Elazar Shach points out that the Midrash (Bereishis Rabbah 84:19) teaches that the Jews of Egypt wore sack before their miraculous redemption. By tapping into this ancient tradition, Mordechai was showing his faith in H-Shem and the Torah.
On a more mystical note, R’ Raphael Moshe Luria writes that Adam and Chava before the sin wore “ohr” (light, spelled aleph-vuv-reish), but were demoted to the status of needing to wear “ohr” (skin, spelled ayin-vuv-reish) as a result of the sin. Based on R’ Moshe Cordevero, Rav Luria continues with the idea that garments of light help one to serve H-Shem, and this is why one was not allowed to enter the “king’s” gate when not properly dressed. Doctors must shed their suits to don scrubs, rubber gloves, and bouffant caps for surgery. The soul, too, must shed the Divine light in which she is dressed to don the hazmat suit that is the earthly body to utilize the physical world in a continued effort to fulfill H-Shem’s Will. In our analogy, the difference between the soul and the doctor is that the soul’s skin automatically turns into light with the achieving of a spiritual goal.
The Ginzei HaMelech brings down from the AriZal that the gematria of “sak” (sack, 300+100=400) is an allusion to the four hundred officers whom Esav commands in his meeting with Yaakov (Bereishis 33:1). Kabbalistically, these themselves represent the four hundred powers of tuma, or manners in which impurity can enter our lives. He brings from the Imrei David that wearing sackcloth [perhaps through its ability to instill humility] gives one the ability to fend off impurity.