Don't expect terraforming to make your cities invincible to the Thunder Warriors or to the other armies on the world. It is a significant defense bonus yes, but its not anything that is beyond the realm of other nations to counter.
The Terraforming option is better at defense in the sense it can cover and affect a wider area than the others, but it flat out doesn't have the same heights of defense that the energy tech path presents. That option is the single best option for pure defense, terraforming gives bonuses to resource production and other forms of infrastructure as well as military so its value for military areas is limited.
The Energy option splits its value between defense and offense, while the Unmaker option provides the single best offense in the game including being the only option that has a chance to simply Kill Emps with a single Army group.
The AI option is horde spam, quantity over quality is the name of the game. It has no need to spend pops on armies and can simply flash forge groups of rickety droid to attack commanded by a few better equipped robots.
In short each option does different things, but all are equally as viable and with differing costs inherent to their choices.
Energy - best basic offense and defense option
Terraforming - gives slight upgrades to defense and infrastructure (resource production)
Unmaker - the ultimate offense and the best methods of handling psykers/blanks/chaos and other such threats
AI - unending hordes of metal that cost little to make and even less to supply. Very few good units though