How am I meant to know whether to focus on lasers, missiles, armour etc etc etc?
Just keep an eye on what everyone else is using. In most games, there will be one, maybe two, weapon types that are primarily used by the other races. The same goes for defences. So if everyone is going for missile weapons and using laser defences, you can focus on point defence to protect your ships against their weapons, and you select anything but lasers in order to attack them with. Occasionally you might end up having to develop your armada on a race by race basis. Just keep an eye on the ones that you think will be more likely to attack and choose your research paths accordingly.
So is there any advise anyone can give me about staying out of wars? Or if not, being able to defend myself without ending up as a militaristic nation?
It would be a shame if you always had be be militaristic in every game.
It's not necessary to always be militaristic, my first couple of wins were through diplomacy and tech, but you still need to devote resources to your military. Keep an eye on your overall military rating compared to the other races. If you're the weakest, there's a very good chance you will get pounced on.
It also depends alot on the particular game you're playing. If there's a number of aggresive races in it, expect the worst. If most of the other races are peaceful, then it would be safe to pursue a more diplomatic game. Either way though, never let yourself get too weak in realtion to everyone else. You're just inviting invasion that way. Even though you don't intend on using them, having lots of ship available is the best deterant to war.