The meanings of the words "explode" and "detonate" overlap[. In some contexts either can be used. In other contexts only one will be appropriate.
In general "detonate is most often used for an intentional act, or the result of such an act.
(1) The technician detonated the bomb by sending a radio signal.
The word "explode could also be used in sentence (1), but would be somewhat less common.
The word "detonate is most often used when speaking or writing about explosive devices, such as bombs, that is devices designed to cause an explosion. It is also used with substances, such as dynamite, TNT, and nitroglycerine, (and many others) used in the construction of such devices. It is not generally used in things that explode, but were never intended or designed to do so. In particular, it is rarely if ever use in describing mechanical explosions. For example, one might write:
(2) The boiler was overheated, so it exploded.
One would not use "detonate in sentence (2). Similarly one might well write of a "steam explosion", but rarely if ever of a "steam detonation". This Goiogle Ngram shows this difference in usage within the google corpus.
As always with Google Ngrams, one should remember the limits of this tool. It shows only short phrases in published books and magazines. It will not show instances where they key words occur, but are separated by other words. It notes the publication date of the book or magazine, not the date the text was written. It does not notw whether the author was a skilled or unskilled user of English. And so on. But within those limits it can be a powerful tool.
The word "explode" is more general than the words "detonate". In most if not all cases where "detonate". would be properly and naturally used, "explode" could be used by a fluent speaker, adn would be understood by a fluent speaker. The reverse is not true.
The word "explode" also has a number of metaphoric or figurative senses. These are in general not shared by the word "detonate". For example, one may explode a myth or a rumor, meanign to demolish it by shoiwing it to be untrue.
(3) That theory is long exploded.
means that the theory has been disproved, and is no longer taken seriously. One would not use "detonated" in that sense.
One can also use "explode" of an organization.
(4) The US Whig party exploded in the first half of the nineteenth century.
This means that then organization dissolved, more or less suddenly adn violently, leaving little behind.
A person may be said to "explode", meaning to show sudden and often violent emotion. One would not use "detonate" in such a sense.
An "exploded view diagram" shows an object or assemply with its various parts separated, as if it had flown to pieces. Usually lines or arrows show how these parts relate to one another. One would not write of such a diagram as a "detonated view diagram".
Sources
Explode
Sense 1
If an object such as a bomb explodes or if someone or something explodes it, it bursts loudly and with great force, often causing damage or injury.
Sense 2
If someone explodes, they express strong feelings suddenly and violently.
Do you fear that you'll burst into tears or explode with anger in front of her?
Sense 3
If something explodes, it increases suddenly and rapidly in number or intensity.
The population explodes to 40,000 during the tourist season.
Sense 4
If someone explodes a theory or myth, they prove that it is wrong or impossible.
*Electricity privatization has exploded the myth of cheap nuclear power. *
(Sense 1) To burst with a lot of force and a loud noise
(SENSE 1a) To make something burst with a lot of force and a loud noise
(Sense 1b) To make a sudden loud noise
Thunder exploded over the meadow.
Nouns frequently used as subjects of explode:
bomb, device, firework, grenade, shell
(sense 2) to express strong emotions in a sudden, noisy, and often violent way
(sense 3) To increase a lot in size, amount, or importance over a very short period of time
(sense 4) to prove that a story or theory that many people believe is in fact false
(sense 5) to move very quickly
A group of youths exploded out of the door.
(I will edit this answer to add additional sources within the next 24 hours)