Prime Minister Modi, who held wide-ranging talks with State Counsellor Aung San Suu Kyi, asserted that it was important to maintain the security and stability of the land and maritime boundaries of the two countries.
The two leaders also vowed to combat terror and boost security cooperation.
PM Modi's first bilateral visit to Myanmar comes at a time when the Myanmarese government led by Nobel laureate Suu Kyi is facing international pressure over the 125,000 Rohingya Muslims that have poured into Bangladesh in just two weeks after Myanmar's military launched a crackdown in the Rakhine state.
PM Modi, in his joint press statement with Ms Suu Kyi after the talks, said India understands the problems being faced by Myanmar. He said India shares Myanmar's concerns over "extremist violence" in the Rakhine state, especially the loss of innocent lives of the people and the security personnel.
"When it comes to a big peace process or finding a solution to a special issue, we hope that all stakeholders can work together towards finding a solution which while respecting the unity and territorial integrity of Myanmar ensures peace, justice and dignity for all," PM Modi said.
His remarks came a day after Union Minister Kiren Rijiju said Rohingyas are illegal immigrants and will be deported from India. Mr Rijiju had asserted that nobody should preach India on the issue as the country has absorbed the maximum number of refugees in the world.
After talks between PM Modi and Ms Suu Kyi, 11 agreements were signed between the two sides in areas like maritime security, strengthening democratic institutions in Myanmar, health and information technology.
PM Modi, in his statement, stressed on scaling up security cooperation, saying that being neighbours, the two countries have similar security concerns.
Taking a strong stance on terror, Ms Suu Kyi said, "Together we will ensure that terror is not allowed to take root on our soil or on the soil of neighbouring countries."
Ms Suu Kyi also thanked India for taking a strong stand on the terror threat that Myanmar faced recently.
Rohingya militants raided police posts in Myanmar's Rakhine state last month, killing 12 security personnel.
The meeting between PM Modi and Ms Suu Kyi came on a day she was quoted as telling Turkish President Recep Tayyip Erdogan that global outrage over Myanmar's treatment of its Rohingya Muslims was being fuelled by "a huge iceberg of misinformation".
Sympathy for the Rohingya was being generated by "a huge iceberg of misinformation calculated to create a lot of problems between different communities and with the aim of promoting the interest of the terrorists", Ms Suu Kyi was quoted by an official statement as telling Mr Erdogan in a call.
Ms Suu Kyi has come under fire in recent days for failing to speak out against violence targeting Rohingyas, particularly given her previous image as a champion of human rights.
Hundreds have died since Rohingya militants raided police posts in Myanmar's Rakhine State.
UN Secretary-General Antonio Guterres has also called for the Muslims of Rakhine state to be given either nationality or legal status, and voiced concern about violence that has since late August forced nearly 125,000 people to flee and risk destabilising the region.
PM Modi also asserted that India stands by Myanmar amid the challenges the country is facing. He said that India has decided to grant gratis (no-cost) visa to Myanmarese citizens who wish to visit the country.
PM Modi highlighted the development initiatives India was undertaking in Mynamar especially in capacity building, which Ms Suu Kyi said her country needed the most.
"I believe the democratic experience of India is relevant for Myanmar and that is why we are proud of our massive support in the capacity building of the executive, legislature, election commission and press council and other institutions in Myanmar," Prime Minister Modi said.
Talking about India's assistance to Myanmar, he said the work on the Paletwa Inland Waterways Terminal and Sittwe port under the Kaladan project has been completed.
PM Modi also noted that the high-speed diesel from India has started coming through trucks to meet the needs of Upper Myanmar.
Under the development partnership, PM Modi highlighted India's assistance in the development of high quality education and healthcare and research facilities in Myanmar. He said in future also India would take up projects that will be according to the needs and priorities of Myanmar.
"Today's agreements will strengthen our all-round bilateral cooperation," the prime minister said. He also lauded Ms Suu Kyi's leadership in Myanmar's peace process.
Earlier, during the delegation-level talks, Prime Minister Modi said, "We would like to contribute to Myanmar's development efforts as part of our 'Sabka saath sabka vikaas' initiative."
He said deepening the relationship with Myanmar was a priority for India, as a neighbour and also in the context of the 'Act East Policy'.
Later in the day, PM Modi flew to Bagan and paid respects at the Ananda Temple there.
PM Modi arrived in Myanmar on the second leg of his two-nation trip after he travelled to the southeastern Chinese city Xiamen where he attended the annual BRICS Summit.
Yesterday, PM Modi called on Myanmarese President Htin Kyaw, describing it as a "wonderful meeting". They had discussed steps to deepen the "historical relationship" between the two neighbours.
This is PM Modi's first bilateral visit to Myanmar. He had visited the country in 2014 to attend the ASEAN-India Summit.
The Myanmarese president and Ms Suu Kyi had visited India last year.
Myanmar is one of India's strategic neighbours and shares a 1,640-km-long border with a number of northeastern states.