Rashi’s simple explanation is that Mordechai thinks Esther believes she will be safe in the palace on the day of the massacre. Rabbi Avigdor Bonchek, however, sees in Rashi’s words an irony that Esther’s safety can only be guaranteed through self-sacrifice.
The Vilna Gaon writes that Mordechai thought that Esther was under the impression that her volunteering herself to Achashverosh was one of the carnal sins for which one should sacrifice one’s life rather than sin, even for the sake of others.
The Sfas Emes points out that the Halacha (Shulchan Aruch, Yoreh Deah 157:1) requires a city under siege to refuse to give up any resident requested for execution by the attacking army. This is the case if this oppressive army does not specify their victim. However, if they they want a specific person, the community must give that person up to save themselves, since that person is threatened either way. This is only true when that person is threatened along with everyone else. Mordechai thinks Esther considers herself to be in this latter situation, safely tucked away in the palace.
R’ Dovid Feinstein writes that Mordechai was saying that H-Shem will save His people, as He always does. However, if Esther acts selfishly, she will not be among the other Jews.
Similarly, due to the fact that Mordechai mentions the king’s palace, and every mention of the word “king” is a reference to H-Shem, R’ Dovid Moshe Valle adds that the King can reach anywhere.
R’ Elisha Gallico notes that, in fact, Esther was actually in more danger staying in the palace. The reason for this, explains the Maharal, is that considering Achashverosh’s virulent hate for the Jews, Esther is safer away from the man who signed the edict to annihilate her nation. The Maharal compares this to living inside a basket with a snake. This is even moreso the case if Esther thinks of herself as an individual, and thus lacking the power of the united nation.
The Alshich says that, in Mordechai’s estimation, the root of Esther’s mission was to fix King Shaul’s error of allowing Agag to live.
According to Ginzei HaMelech, this is the reason why Mordechai is giving Esther such strong rebuke here; Esther needs to know that the only reason she was in that position was for this goal. Furthermore, Ginzei HaMelech points out that Torah is honest. Here, since Megillas Esther was written by Esther, herself, she nevertheless did not censor out this scene in which she looks weak. The Ginzei HaMelech furthermore adds that this case it was not appropriate to stay private.
R’ Menachem Ziemba was asked before the Warsaw ghetto uprising if the Chassidim should be involved in the fighting. He answered that it is indeed a mitzvah to give up one’s life when given the choice between death or their faith. When given no such choice, it is a mitzvah to fight.
According to the Kisei Shlomo, Mordechai was telling Esther she was responsible for Hasach’s death, and thus more invested now in the rescue of the Jews.
Rav Yitzchak Hutner writes in Pachad Ytizchak that when Person A needs something, and decides to also pray for Person B who also needs that, this makes Person A’s prayer more effective (Talmud, Baba Kama 92a). Rav Hutner explains that this principle works because prayer is stronger if it is performed with the whole heart (Talmud, Sotah 5b), meaning that it is more strongly felt. Therefore, Mordechai is telling Esther that she needs the same rescue as the Jews. In other words, she was already intent on praying for the Jews; what Mordechai wanted Esther to realize was that she was in the same precarious situation. Realizing that she also needs H-Shem to rescue her would cause Esther to feel that prayer with her whole heart, making her prayer stronger, and thus more effective.
According to Targum Sheini, Mordechai was concerned that the king would become upset with Esther at some point, and take his anger out on her people. This is similar to what actually happens when Haman becomes angry with one Jew, Mordechai, and decides to exterminate his entire people as a consequence (see below 3:6).
The Ibn Ezra quotes commentators critical of Mordechai for this order, saying his selfish intent was for Esther to not be chosen by Achashverosh, so that she could return to being Mordechai’s wife. He rejects these opinions, and comments that Esther’s keeping this secret allowed her to stay Jewish because the king would have used violence in an attempt to force Esther to convert had he known her background.
Rabbi Eliezer of Worms writes that Mordechai knew that Esther’s very presence in the harem of the king meant that she was placed there for a reason. After all, wherever we are in life, H-Shem wants us there for a reason, though we often do not readily know what it is.
Rav Moshe Meir Weiss adds that even if Esther did not understand the reason for her secrecy, or even if she disagreed, this verse is a praise to her for listening to the words of Mordechai, the Gadol HaDor (greatest rabbi of her generation). When we trust the Sages, things go well for us.