Orbiting or landing transports never fire back at attacking ships.
Seconded for fixing. If they won't fire back, at least have them not count towards space forces
Transports don't fire their weapons because they have scanner = 0.0 set in their attributes (see Core Library on github). This means that the individual transports can't actually "see" any enemy units.
To prove this, send a transport-only fleet with infantry legions to some world with planetary defenses and order an invasion. Zoom into the tactical view and observe how missiles and beams are still rendered and hit the transports, but no actual defensive units can be seen. This also means that units can't "spot" for each other, if a player has jumpships escorting the invading transports the transports themselves still can't detect any enemy units.
Easily fixed by setting "scanner" attribute for the Reliant and Warphant to a non-zero value in the Core Library.
I am pretty sure scanner value is only used for detecting fleets and clearing black hexes. While a nonzero scanner value is needed to reveal units to the player in the tactical screen, I am not aware of any reason to believe that scanners actually affect wings' ability to pick targets.
Instead, I'm pretty sure the reason transports don't fire their weapons is that units only fire when they are performing the "attack" action, and they only fire at a specific target. Transports never voluntarily perform "attack" (this is fine, clearly they are not frontline units) and do not accept the order if it is manually issued. The game would require "opportunity fire"- where units fire at anything in range- for transports to be able to defend themselves. This was implemented in Alpha 4 according to the changelog, but I have never seen evidence that it is performed by any unit type in Era 3.
Since this bug was reported, unit firing ranges have changed significantly. Transport weapons are very short-ranged and there are now very few units that would attack transports from within a range where the transports would be able to fire back without changing their orbit. Since it does not make sense for transports to pursue their attackers, the only situation where weapons on transports would make a difference is when transports incidentally fire against units and defenses during the landing approach and possibly for firing at fleets that warp or jump into the system during an attack.