I'd say defenses are crucial as soon as you're dealing with enemy hulls large enough that you can't one-shot them, or when you're dealing with fleets of smaller ships. (This assumes approximate technological parity between the sides, or an advantage on your side. The Dread Lords and similar situations of overwhelming firepower are a special case.)
The reason is, if you can't wipe out their ships almost immediately, they're going to get to shoot back. If you have no armor, even if they're using low-end weapons they're going to do a significant amount of damage to you.
On the other hand if you've got a bit of defense you can substantially reduce the damage taken on the return volley.
Also, unless you know your enemy is using nothing but one weapon type, multiple defensive types of moderate strength seem to be more effective than a single powerful defense of one type.
Here's the math and assumptions: Assume you can only mount three defensive things, and all three trees are up to, say, rating 3.
Option 1: Specialization.
If you're specialized, you'll have defense of 9 against one type of attack. Cool, right? Not if they're using some other attack. In that case, your defense is only sqrt(9) = 3. That kinda sucks.
Option 2: Total Diversification.
Now you have rating 3 defense in all three weapon categories. That means against any attack, your total defense is 3 + sqrt(3) + sqrt(3) = 6.46. That's defense either 6 or 7 across the board, depending on how the game rounds. Granted, that a third less than you'd get in one category if you specialized, but it's one third *more* in both the other categories, making it clearly superior if your enemy or enemies make any significant use of multiple weapon systems.
Option 3: Partial Diversification.
You could put two defensive items into one category and one into another. Against your "good" attack, that would give you a defense of 6 + sqrt(3) = 7.73. So, 7 or 8, depending on how the numbers are rounded. One or two more than option 2. Against an average attack, your defense would be 3 + sqrt(6) = 5.45. So, either 5 or 6, depending on how the game rounds. That's 1 less than option 3. Your worst category would be sqrt(6) + sqrt(3) = 4.18. Either 4 or 5, which would be two lower than option 2. This is a good option if your enemies focus primarily on one weapon, with some of another. It is slightly inferior to option 2, though, if your enemies are evenly balanced between two, or use all three weapons systems.
Option 2 is the safe strategy. It requires more research effort, but you end up fairly well prepared for anything. Option 3 is also fairly safe if you don't want to fool with too many research paths, or your enemies are somewhat (but not completely) focused in their weapon usage. Option 1 is only particularly good if you're fighting enemies focusing almost monomaniacally on one weapon type.