Under the 1910 Treaty of Punakha with the UK, "the Bhutanese Government agree[d] to be guided by the advice of the British Government in regard to its external relations." Bhutan, while never British sovereign territory, was essentially on the outer fringes of the British Empire, and any attempt to establish diplomatic relations outside the empire might well have lead to another war.
After Indian independence, under the 1949 Treaty of Friendship with India, "the Government of Bhutan agree[d] to be guided by the advice of the Government of India in regard to its external relations." This essentially preserved the status quo, but with New Delhi taking over from London. However, from the late 1960s, the Bhutanese government gradually began to develop external diplomatic relations.
In 2007, a new Friendship Treaty was signed with India. This makes no reference to India guiding Bhutan in the latter's external relations, though it does state that "[n]either Government shall allow the use of its territory for activities harmful to the national security and interest of the other." Since then, Thimphu has established formal relations with a much wider group of partners and has not needed to consult India about doing so.
Understanding why these shifts have happened is very difficult. Bhutan does not have free media and policy decisions are largely made in private.
Two external events provide important context. The 1971 Bangladesh war gave Bhutan an opportunity to develop a new relationship in support of Indian foreign policy. India was eager to secure international recognition of the nascent Bangladeshi state, so it suited Delhi to have Bhutan on the list. The 1975 incorporation of Sikkim into India was a huge shock. Sikkim was essentially a sister state to Bhutan, sharing the same Buddhist and Tibetic culture, though diplomatically one step closer to first Britain and then India. Its annexation made Bhutan aware that total dependence on Delhi could be a threat. But these events should not be overemphasized: the development of diplomatic independence started before 1971 and to this day, Bhutan is very concerned to maintain good relations with India.
It may also be worth pondering a couple of counterfactuals. If Bhutan had been through a revolution, as Sikkim did, and the new regime wanted to remain independent, then they might well have wished to develop new diplomatic friends very quickly in order to deter Indian intervention (or Chinese intervention, depending on the nature of the revolution).
But this has not happened. The current regime have benefited greatly from the status quo and they have everything to lose from sudden change. Some might see their self-interest as sufficient explanation for their deep conservatism; others might attribute it to the outworking in politics of their Buddhist-nationalist beliefs.
It is also worth remembering that Bhutan's other giant neighbour, China, has had its own difficulties with establishing diplomatic relations. The Qing Empire was not regarded as an equal by the major Western powers (though the feeling was often mutual), there were decades of civil war, and much of the world did not regard the People's Republic of China as a legitimate government until the 1970s, at which point the PRC largely lost interest in the rest of the world during the Cultural Revolution. By contrast, Communist China's rise to superpower status has perhaps accelerated Bhutan's need to engage with the outside world in recent years.