There is a mitzvah to establish a holiday, to rejoice and praise God, on a day when Jews were delivered from distress. This is what prompted the Rabbis to establish Purim and Chanukah as everlasting holidays. Even though it is forbidden to add mitzvot to the Torah, this mitzvah is an exception, for it is derived from a logical inference (a kal va’chomer): when we left Egypt and were delivered from slavery to freedom, God commanded us to celebrate Pesach and sing praise to Him every year; all the more so [must we celebrate] Purim, when we were saved from death to life (Megillah 14a). This is what the Rabbis relied on when establishing Chanukah as well (Ritva, ibid.). The Chatam Sofer explains (Yoreh Deah end of 233, Orach Chaim 208) that since this mitzvah is derived from a kal va’chomer, it is considered a biblical commandment. However, the Torah does not prescribe exactly how to make a holiday; therefore, one who does anything to commemorate these great salvations fulfills his biblical obligation. It was the Rabbis who determined that we read the Megillah, prepare a festive meal, send portions of food to others, and give charity to the poor on Purim, and light the candles on Chanukah.
Many Jewish communities throughout the ages kept this mitzvah of instituting days of joy in commemoration of miracles that happened to them. Many of them used the name Purim in reference to these days, like “Frankfort Purim” and “Tiberias Purim.” Some communities had a custom to eat festive meals, send portions of food to one another, and give alms to the poor on these days. Maharam Alshakar(49) writes that the enactments made by these communities have binding force, obligating all of their descendants to keep them, even if they move to a new community. Other Acharonim concur (Magen Avraham and Eliyah Rabbah 686:5)4.
The great gaon, Rabbi Meshulam Roth (Rata), writes: “There is no doubt that we are commanded to rejoice, establish a holiday, and say Hallel on [the fifth of Iyar], the day which the government, the members of the Knesset (who were chosen by the majority of the people), and most of the greatest rabbis, fixed as the day on which to celebrate, throughout the Land, the miracle of our salvation and freedom” (Responsa Kol Mevaser 1:21)5.
 The Pri Chadash (Orach Chaim 496, Kuntras HaMinhagim 14) disagrees with Maharam Alshakar, writing that we should not establish new holidays after the destruction of the Temple, when the Rabbis canceled the already-existing holidays enumerated in Megillat Ta’anit. However, the Chatam Sofer (O.C. 191) proves that we should create new holidays; saying the fact that they canceled, after the destruction, the festive days mentioned in Megillat Ta’anit is no proof, for they canceled only the holidays that were connected to the Holy Temple. The Chatam Sofer adds and relates that he himself celebrates “Frankfort Purim,” on the 20th of Adar, because he was born there, even though he had since moved elsewhere. It is also well-known that the Rambam established holidays for himself and his offspring in commemoration of salvations that he experienced – for example, surviving a storm at sea. A similar account is found in Chayei Adam (155:41). The author of Yaskil Avdi (vol. 7, O.C. 44:12) cites many examples of the institution of “Purim” days in various communities and consequently rules (vol. 8, omissions 4) that we may establish Yom HaAtzmaut as a holiday. Two more important sources on this issue from the Rishonim are: Ibn Ezra, Bamidba,r 10:10; Rabbeinu Tam, cited in Tosafot Ri to Berachot (8a in the Rif pages).
 In his Responsa Kol Mevaser (vol. 1, 21:2-3), the brilliant Rabbi Meshulam Roth (about whom our master HaRav Tzvi Yehudah HaKohen Kook said that he was the gadol ha’dor after the passing of HaRav Kook, zt”l,) explains – based on the Ramban, the Ritva, and other Rishonim and Acharonim – that the foundation of the mitzvah to establish Yom HaAtzmaut as a holiday is the kal va’chomer [mentioned above]. Therefore, establishing it was not in violation of “You shall not add [to the commandments]” (Devarim 13:1), for the prohibition against inventing a holiday refers only to holidays that do not commemorate a salvation. Based on the kal va’chomer, however, we are obligated to institute holidays that commemorate salvations. Rabbi Roth adds that a prophet is forbidden to establish a new holiday based on prophecy. The need to come up with a special scriptural exposition regarding Purim (Megillah 7a) was [only] in order to canonize the Scroll of Esther.
Pay attention to Rabbi Meshulam Roth’s reliable statement that Yom HaAtzmaut was instituted by the majority of the greatest rabbis. Granted, they argued about reciting Hallel with a blessing, but the majority of the greatest rabbis agreed on the basic obligation to give thanks and rejoice. The Chatam Sofer writes (O.C. 191, s.v. mihu) that one might violate the prohibition of adding on to the commandments by establishing a holiday for all of Israel. This does not contradict our thesis, because he means that one may not establish a nationwide holiday to commemorate a miracle that happened to one individual community. We are, however, obligated to establish a holiday for all of Israel for a miracle that happened to the Jews as a whole. See also Rabbi Rakover’s Hilchot Yom HaAtzmaut VeYom Yerushalayim, which includes articles on the mitzvah to establish a holiday on Yom HaAtmaut written by the Chief Rabbis and other great Torah scholars.
Some ask, why did Yehoshua neglect to establish a holiday to celebrate the conquest of Eretz Yisrael? The answer is that the holiday of Pesach commemorates both the redemption from Egypt and Israel’s subsequent entry into the Land. This corresponds to the fifth expression of redemption [see Shemot 6:6-8]. Rebbe Tzaddok HaKohen of Lublin posits that the holiday of Tu B’Av (the fifteenth of Av) was established for this reason. Also see below, note 7.