Perhaps the best way to think of this question is to recognize that there are roughly three ways to think about right/legitimacy, which correspond to the angle of one's approach: the state, domestic stakeholders, and the international community. Each of these are considered below. We should also recognize the difference between a "claim" to legitimacy, and whether or not we, looking back, hold those those claims to be legitimate. I don't touch on the latter, which will quickly become mired in debates over either nationalism or international law.
The new pro-independence forces, as of 1945, rarely articulated their legitimacy in terms of a "successor state" or international legal terms. They sought to describe a positive and creative project in the form of a national community, call it an imagined community if you like, of Indonesia that encompassed a diverse group of people. Call this, if you like, "the right to speak on behalf of a people" that dates back to ideas of self-determination in the lead up and aftermath of World War I. This found concrete form in the famous 17 August, 1945 independence proclamation, after negotiations between the nationalist leaders Sukarno, Hatta and others, and possibly some of the Japanese officers who may have been present. It referred only to the "people of indonesia" in vaguest terms, which concealed the divisions and diversity which would remain a challenge to come. The authority of this claim was based on the perceived broad representation of various communities in the various youth and other political organizations active at time who recognized the leadership of Sukarno and Hatta.
This "right to speak upon behalf of the national community" of course is always a threatened and negotiated thing. There was not one vision of Indonesia, but many. Some of these were manifested in the political dreams of the major nationalist/political/religious organizations including the Sarekat Islam, the Muhammadiyah, the Communist Party of Indonesia, and the Nationalist Party of Indonesia). Each had different conceptions of what the community represented, why its constituent members were indeed members, and what role they were to play. See Bertrand's Nationalism and Ethnic Conflict in Indonesia for more on these varying visions. Some of these, especially religious movements such as Darul Islam in West Java, and others in Aceh, Sulawesi, etc. continued to seek out contending separatist nations.
Most interestingly and dangerously for the idea of a specific Indonesian nation were competing visions of various levels of Malayan-Indonesian unity, even larger in scope than the already complex mix of communities that fell under an Indonesian nation. See first half of Joseph Chi Liow's Politics of Indonesia-Malaysia Relations: One Kin, Two Nations.
The International Community
Of course, at the end of the day, it is the recognition of nations by an international community, or at least, the claims which are formulated in a way that operates on this level, which has huge repercusions for treaties, trade, and feeds back into domestic legitimacy.
The Dutch actively tried to dispel the idea of a single national Indonesian community by promoting competing states of Pasundan, Madura, and the "Great Dayak" and towards the end leading up to 1949 tried to create a federal system but following independence most of these actually supported their own dissolution into a unified republic (I'm summarizing Bertrand, p32). As in many post-colonial cases, the most important exception being partition in India in 1947, it was easiest for the international community to recognize the most powerful post-colonial contender and ignore call for recognition from separatists unless there was a compelling political justification to recognize holdouts.