Since 1999, May 11 is commemorated as the National Technology Day to mark India's scientific prowess and technological advancements.
"Greetings to everyone, especially our industrious scientists and those passionate about technology, on National Technology Day," Mr Modi tweeted.
"We remain grateful to our scientists & the then political leadership for the courage shown in Pokhran in 1998," he added.
It was the same date in 1998 when India successfully conducted the first among the five nuclear tests in Pokhran under the leadership of Mr Vajpayee. The tests showcased India's might to the entire world.
Later, in response to a tweet by a follower that "Pokhran test (had) made us proud as well as world recognizes us as world power", Mr Modi wrote, "Yes, you are right".
In another tweet, PM Modi hailed the "stellar accomplishments and contribution" of former President APJ Abdul Kalam in the nuclear test.
A post on PM Modi's website referred to an earlier speech delivere by him, wherein he had said, "Under Atalji's leadership, successful tests were carried out and the entire world was witness to India's might. The scientists made the nation proud."
Recalling the nearly two-decade-old development, Mr Modi said, "After the first series of tests the world community placed sanctions on India. On 13th May 1998, Atalji again called for tests, thus showing that he was made of a different mettle. If we had had a weak PM, he or she would have got scared on the same day. But Atal ji was different. He did not get scared."
Lauding the role the people of Pokhran played by keeping silent during the nuclear tests, Mr Modi said, "People of Pokhran must be lauded for maintaining silence during entire duration when the tests were planned and conducted. They placed interest of the nation above everything else."