The trip was Modi's first to the White House under the Trump administration. India's PM said he received a "warm welcome" and that it was "filled with friendliness."
The White House said the theme of Monday's visit was cooperation.
"I have always had a deep admiration for your country and for its people, and a profound appreciation for your rich culture, heritage and traditions," Trump told Modi during a joint news conference. "During my campaign, I pledged that if elected, India would have a true friend in the White House."
Among the issues the two leaders discussed were counter-terrorism, trade, law enforcement and energy.
"Relations between countries are strongest when they are devoted to the interests of the people we serve. And after our meetings today, I will say that the relationship between India and the United States has never been stronger, has never been better," Trump said, calling India the world's "largest democracy."
Modi has previously said that he hopes to accomplish many partnerships with the Trump administration over the next several years.
"Our robust strategic partnership is such that it touches upon almost all areas of human endeavor," the Indian PM said at Monday's news conference. "President Trump and I have discussed all dimensions of India-U.S. relations at length. Both nations are committed to a bilateral architecture that will take our strategic partnership to new heights."
Modi is the latest world leader to visit Trump at the White House. Previous leaders to make the trip since January are Canadian PM Justin Trudeau, Chinese President Xi Jinping, Italian PM Paolo Gentiloni, Japanese PM Shinzo Abe and British Prime Minister Theresa May.
At Monday's visit, Trump jokingly boasted that he and Modi are very active with their leadership on social media, as Trump is famous for his various tweets.
"We're believers -- giving the citizens of our countries the opportunity to hear directly from their elected officials, and for us to hear directly from them," Trump said. "I guess it's worked very well in both cases."
There have been a few issues the pair have disagreed on, however -- including climate change and some economic and immigration fronts. Both leaders seemed motivated on Monday, though, to resolve some of their existing differences.
"The security partnership between the United States and India is incredibly important," Trump said. "Working together, I truly believe our two countries can set an example for many other nations."
"Be assured that in this joint journey of our two nations towards development, growth and prosperity, I will remain a driven, determined, and decisive partner," Modi added.