NEW DELHI—When India’s premier wanted to signal a thaw in relations with rival Pakistan recently, he didn’t call a press conference or make a televised speech. He tweeted.

First, Prime Minister Narendra Modi conveyed his “best wishes” to Pakistan’s cricket team. Another tweet said he was dispatching his foreign secretary to neighboring capitals, including Islamabad, “to further strengthen our ties.”

Since...