A few general ideas for you:
Pausing
Defender mode is really quite intense and fast-moving, so making use of the pause button (there are settings options for making it keep playing the music and not darken the screen while you do so) can be a big boost.
# Starting Planets
Typically the way you start out the defender mode can make a big difference on how easy or hard the scenario is. If you're starting out with one planet... my god that's likely to be impossible. You won't be taking any planets while in this mode (good luck even trying), so however many planets you start out with determines how much room there is for error in your defenses.
If you start out with dozens of planets and a shortish timer, you can play horribly and probably still win because the AI won't have time to roll you. Playing with one planet is just as unfair in the other direction. As the tooltips in-game note, usually something like 4-5 planets is probably ideal. But even that depends on how your layout is -- if you're playing the center of a concentric circles or X map, then you probably want to take at least two-deep of a buffer to your central planet in all directions for a fair fight. Conversely, playing a Snake or a Tree map might be easier to dig yourself in on, since it's simpler to stack your defenses.
Nuke em from orbit
Defender mode is one of those cases where AI Progress matters fairly little. Well, it matters a ton, but it's already spiraling upwards pretty fast with each wave, so adding even something like 50 more AIP doesn't have much overall effect on things. So I guess I mean the scale of how you care about AIP is changed, perhaps reduced by 10x or so. Instead of thinking of 1 AIP as practically free, and 5 AIP as quite cheap, I think in terms of 10 AIP as practically free, and 50 AIP as quite cheap, for example.
That also depends on how long your defender mode is, of course -- if you play longer than about 45 minutes, the scale of how you care about AIP goes back closer to normal.
Anyway, so my point is that you can use the missile silo to pretty great effect. Have a nuke or two on-hand, carefully out of the way. Then if there are 8k ships barreling through your outer planets and you have no hope of survival... nuke em from orbit! You'll still have to deal with any mark V ships or any ships that are immune to nukes (like many starships), but at least your task will be vastly reduced.
If you find yourself leaning on nukes too heavily during a defender campaign, you're probably in trouble, but using one or two nukes as a sort of "Get out of trouble free" card can work wonders. Frankly, that's also true of CPAs in the main game, but the AIP tradeoff is a lot more severe-feeling there.
Mines, Spider Turrets, etc
In any sort of situation where you are clearly outmatched by the AI, you need to do stuff that buys you time or that kills the enemy in bulk. Nukes are the most extreme example there, but they have a lot of other negative consequences (AIP, loss of that planet for you, etc). On the other hand, there are numerous other smaller types of units that you can use to lesser effect but without those penalties.
Minefields
Minefields in general can be just incredibly good value for taking out enemy ships in pretty good numbers. Especially area minefields, goodness. Make sure that you are building your minefields in such a way that all the minefields are actually going to use. Watch the patterns of the ones that actually get damaged or exploded in killing enemies -- any that are just sitting there were useless, and are something you can skip placing next time you design a minefield.
Spider Turrets
Spider turrets are great for stranding enemy ships such that they can't move and you can deal with them later. Set them up in an out of the way location, and the AI likely won't get a chance to mess with them. Meanwhile, they'll be reducing the number of ships that you have to face at any one point in the battle.
EMP mines, or full EMP warheads themselves, can also work on the same principle here, although they only have a temporary effect, unlike spider turrets or other engine-damaging units.
Starships
Some people swear by them, others don't. It really depends on your playstyle. I think a lot of the starship-favoring folks tend to be the hit-and-run sort that are doing guerrilla forays into AI territory. That sort of tactic... isn't at all part of defender mode. Given the vast numbers of ships in defender mode, and the lack of high-level targets, that probably means that starships are in general less valuable in that specific mode.
That said, you probably want siege starships of yours to be hammering the AI ships from afar. You also want light starships (or even flagships) boosting the heck out of the munitions of your smaller forces (the effect is quite notable). You probably also want riot starships armed with lots of engine-killing stuff so that they can strand a ton of the AI's smaller ships (same sort of mentality as the spider turrets).
Command Station Upgrades
In defender mode, you can't build command stations, so these aren't something to worry with. In the main game, sure, they are enormously useful. I personally always go for mark III economic ones, but other players vary in what they like the best. And it depends on the situation, too. Sometimes lonely outpost planets really need a military command station, for example.
Controlling the Numbers In Each Engagement
The key thing, when you have 1000 ships and the AI has 6000 incoming ships, is to not fight them all at one time. If you can fight them 250 or 500 at a time, you'll dominate every encounter, right? If you have sufficient healing along with, or sufficient reinforcements constantly being cranked out continuously, then you can keep that up indefinitely and eventually they are dead and you are not.
The tricky part is figuring out in what ways to best misdirect, delay, distract, or mass-murder the AI ships in order let your military ships pick them off. In the normal game of AI War, you are the guerrilla going into the AI's territory most of the time. But in the defender mode, it's open warfare and the AI is coming for you, instead -- by default, this means that the AI suddenly has "the tempo," and you are constantly and irrevocably on the back foot in this mode.
Put another way: given enough time, you will lose in defender mode. "It is inevitable, Mr. Anderson," but for real this time. This is like the Kobayashi Maru, but with one important distinction -- the time limit. Your goal is not to survive indefinitely, which is impossible in this mode, but rather to survive for a certain amount of time, which is hard as heck but definitely not impossible.
Thus your two sole tasks in defender mode, as simply as possible, are to delay, and to control/contain the damage. That's why things like nukes, or spider turrets, or whatever are so much more admissible in the higher levels of play in this mode compared to the higher levels of play in the normal campaigns. It's quite a different way of playing, despite the units being the same in both games!