It is a mitzvah to say Hallel on special occasions, in order to thank and praise Hashem for the miracles He performs on our behalf. First and foremost are the holidays that the Torah commands us to observe: Pesach, Shavu’ot, and Sukkot, on which we remember the miracles and acts of kindness that God did for us when He took us out of Egypt, gave us the Torah, and brought us through the desert to Eretz Yisrael.
Our Sages also instituted the recitation of Hallel on all eight days of Chanukah, as the beraita states (Megillat Ta’anit, chap. 9): “Why did they see fit to [require us to recite the] complete Hallel on these days? To teach us that for every salvation HaKadosh Baruch Hu performs for Israel, they [the Jews] come before Him in song and praise. Accordingly, it says in the Book of Ezra(3:11), ‘They sang responsively with praise and thanksgiving to the Lord, for He is good….’”
Similarly, the Talmud (Pesachim 117a) states that after the miracle of the splitting of the Red Sea, “the prophets among them instituted that the Jews should recite Hallel for each and every season [i.e., festival] and each and every trouble that should ‘not’ come upon them; [meaning], when they are redeemed, they should say it upon their redemption.” Rashi explains that the Sages of the Second Temple era relied on this to institute the recitation of Hallel on Chanukah.
Thus, it is incumbent upon us to say Hallel over the miracle that Hashem did for us on Yom HaAtmaut. On that day we were saved from the greatest trouble of all, that of exile and subjugation to foreigners, which caused all of the terrible decrees and massacres that we suffered for nearly two thousand years6.
We must be very careful not to deny God’s benevolence to us. The Sages say, “Whoever acknowledges his miracle will be privileged to have another miracle done for him.”* On the other hand, if we fail to thank Hashem, we will delay the redemption, God forbid, as the Talmud relates regarding King Chizkiyahu. He was a very righteous man who spread a great deal of Torah throughout Israel, but difficult times eventually beset him. Sancheriv, King of Assyria, descended upon Jerusalem with a mighty army, intending to destroy it, and Chizkiyahu fell deathly ill. Nevertheless, he did not lose faith; instead, he cried out to God, Who performed a great miracle on his behalf, curing his illness and destroying Sancheriv’s entire army in one night. At that moment, God wanted to declare Chizkiyahu as the Mashiach and make the war against Sancheriv into the final war of Gog andMagog, bringing redemption to the world. But Chizkiyahu did not say shirah, a song – i.e., Hallel – over his redemption. The Attribute of Justice said to God, “Master of the Universe, if You did not make David, King of Israel, the Mashiach, even though he uttered so many songs and praises before You, will You make Chizkiyahu the Mashiach, seeing that he failed to say shirah after You performed all of these miracles for him?” Therefore, the Talmud continues, the matter was sealed, and there was great sorrow in all the worlds. The earth wanted to say shirah in his stead, and the celestial ministers of the world wanted to defend him, but their pleas were rejected, and the opportunity was lost. The prophet said, “Woe to me! Woe to me! Until when?” (Sanhedrin 94a)
The same is true of us. For many generations we prayed, “Raise a banner to gather our exiles,” and “Swiftly, lead us upright to our Land.” Now that our prayers have been answered, shall we not thank Hashem?! Similarly, it says, Save us, O Lord our God, and gather us from among the nations, that we may thank Your holy name, and glory in Your praise(Tehillim 106:47). Now that He has gathered us, shall we not thank His Holy Name and glorify His praise?!
 The Yerushalmi (Pesachim 10:6) also teaches that Hallel should be said on such occasions: “When the Holy One, Blessed Be He, performs miracles for you, you should say shirah (song),” meaning, you should recite Hallel. Shemot Rabbah (23:12) on the Song at the Sea concurs: “And they said, saying (Shemot 15:1) – we will say to our children, and our children [will say] to their children, that when You perform miracles for them, they should say before You a song like this one.” The Talmud (Megillah 14a) asks why we do not say Hallel on Purim. Three answers are given: 1) From the moment the Jews first entered the Land, we do not say Hallel on miracles that occur outside of the Land in Chutz LaAretz. 2) Rav Nachman says that the reading of Megillat Esther is in place of Hallel. 3) Rava answers that we recite Hallel only if the salvation includes freedom from foreign rule; and we remained subjugated to Achashveirosh after the Purim story. The miracle of Yom HaAtzmaut occurred in Eretz Yisrael and freed us from the yoke of the nations. Therefore, according to all opinions, we must say Hallel.
The poskim dispute whether the obligation to say Hallel on days the Jews were saved from distress is biblically or rabbinically mandated? The author of Halachot Gedolot (the Behag) and other Rishonim hold that it is a biblical obligation. (Until King David’s time, no specific formula for praising Hashem was instituted; everyone would compose his own, private thanksgiving prayer. After David composed the Book of Psalms, however, the prophets instituted that we say specific chapters of Psalms, by which we fulfill the mitzvah of praising and thanking Hashem.) According to the Rambam, the whole concept of saying Hallel – whether on the biblical holidays, or in commemoration of the salvations that God performed for the Jews – is a rabbinic mitzvah. The Netziv posits (She’iltot 26:1) that reciting Hallel at the time a miracle occurs, as [the Jews did when they sang] the Song at the Sea, is a biblical commandment, while reciting it every year after that is a rabbinic mitzvah. The Chatam Sofer implies that the biblical commandment exists every year (O.C. 208, s.v. u’mikol makom; Y.D. end of 233).
* [The exact source of this statement is unknown, but it is commonly quoted in the name of Chazal. See Responsa Yaskil Avdi, vol. 6, O.C. 10:8.]