Archons can attack both ground and air units and its attack causes minor splash damage (50% within 15 pixels, 25% within 16-30 pixels). Attacking groups of enemy air units greatly increases the efficiency of archons. Their attack is actually short ranged, and not melee. Archon attacks and splash damage bypass the defiler's Dark Swarm.
Unsurprisingly archons are expensive, especially in gas. Each effectively costs 100 minerals, 300 gas, and 4 psi, the combined price of the two sacrificed high templar. The cost necessarily limits the number of archons that can be used, ensuring that lesser units like zealots remain a vital part of protoss strategy.