This question used to be only resource and doctrine dependent. Now it also depends on terrain. TD has a bonus in plains. AT has a bonus in cities. In addition, both like forests.
TD is now better suited to defend faster moving, self propelled or mechanized units. AT guns are a better match for infantry and other foot powered units. AT+AA guns are ideally situated to support infantry as they 3/3 like urban terrain, and 2/3 like either forests, mountains, or hills.