It is a long answer, and only seems to apply to Europe and Asia, it would be interesting to see if there are pre-Colombian myths of dragons in the Americas, some of the ancient carvings from S. America suggest there is. Are there myths in pre-European Africa and Australasia?
The word comes from Greek, drakos, and relates to any giant serpent whether legendary or not, which in turn is rooted in the, Sanskrit? derk, meaning clear vision.
Put the query in google and have fun doing some research, there's loads of stuff, but probably no definitive answer of where the idea came from.
Monsters from the Id?