My point is this:
3 photons have equal life and shields to one pylon. It would take only slightly longer to kill the photons because of the need to move closer. By killing the photons first, the damage being dealt to your army is reduced by 33% after the first cannon dies, then 66% after the second.
Let us assume that it takes 1 minute for a battalion to deal the required 600 damage to the photons (10 dps). Within 20 seconds the enemy firepower is reduced and again within 40 seconds. Therefore:
From 1-20 seconds 100% damage
From 21-40 seconds 66% damage
From 41-60 seconds 33% damage
Alternatively, attacking the pylon itself the forces take 100% sustained damage for 60 seconds.
This means by attack the Photon Cannons themselves you take approximately 2/3 of the damage from attacking the Pylon directly. If there are more than 3 Cannons, then it might be advantageous to attack the crystal, but if there is an overlap of crystal fields this provides more problems.