With High Templars, you merge them when their energy is low. When would you merge two Dark Templars to form an Archon?
Archons are good against air and ground and do splash damage. If your opponent has countered your cloaked units with a detector unit then I would merge. I almost never use dark templars over High Templars because I think High Templars are a lot more useful and versatile.
One time would be when they have sufficient detection but you are able to save your Dark Templar somehow, either escaping them in time or seeing the detection in advance. Dark Templar are not effective when the enemy sees them coming (or sees them at all), so it is generally better to have an Archon than 2 visible Dark Templar.
One time when it makes sense is when you have two dark templars that are heavily damaged.
Keep in mind that you can also combine a dark templar with regular templar, so if you have a templar that is out of energy, it might be worth it.
Archons can be used as anti-air. They have splash damage. They also have a hefty shield, making them a good meat shield (as long as there is no EMP).
While Dark templar do more damage per hit than archons when fighting a single unit, but most mid- and late-game battles are against a large ball or swarm of units, where archons do more damage per second because of splash. (This is especially true against zergling swarms and smaller air units that bunch together.)
So you would want to change all your DTs to archons any time that you have DTs but: 1) you need anti-air 2) you could really use splash damage 3) you could use some extra meat and don't have time/money for enough zealots 4) your dark templar are regularly detected and destroyed before you get your money's worth out of them.
I have never merged DTs. On the rare case that I make DTs, I always send them straight into an opponents base, where they kill all the workers or die from detection. I should probably start mixing them into my army for added DPS.