With High Templars, you merge them when their energy is low. When would you merge two Dark Templars to form an Archon?
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.
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.