Since at higher levels your military power is important in order to keep everyone from ganging up on you, it pays to optimize it. The formula for each ship is: attack + defense + (ship health / 10) and your military rating on the charts is just all your ships added together.
During the start of a game when I'm in expansionist mode and not feeling like a war, I tend to make tiny or small ships with no engines and as many cheap weapons as I can pack on them. Typically this means mass drivers, but the cost advantage isn't all that much, and if you've gone a bit down the other trees you may end up with ships that have more bang for your buck. I build these ships and then send them off to my outlying colonies. With no engines, they take forever to get into position but they're mainly a deterrent, not an actual fighting force. I try to do one ship per colony before doubling up, since a single ship in orbit is all thats needed to stop a transport from landing (and before I started doing this, I did have a couple times where an unescorted transport zoomed in and attacked a world). As I get new tech, I upgrade this ship design, but don't bother upgrading the ships themselves.
Once I get to the point where I'm not trying to push out as many colony ships as possible and things start slowing down,I design a warship with 1-3 engines, 1 life support and the best weapons/defense I can fit regardless of cost (usually almost entirely weapons at the start of a game, but going heavier on defense as the game progresses). I make a fleet or two of these and park them near any trouble spots I may have. As these ships become obsolete and I replace them with new ships I send them off to take up station around colony planets. These ships are more expensive per military rating, but its good to have at least one fleet of fast and powerful ships in case of an exploitable opportunity or unexpected war declaration.
From there, well... it varies based on the game. If I'm worried that someone might attack my worlds, I design a defender that is the largest ship size I can build and heavy on the defense, and then hope it lasts through the enemies first strike. Later in the game I usually don't have any problems keeping my military rating up, which frees me up to design less "efficient" ships that are much more effective in actual combat but aren't as good at deterring enemies from attacking in the first place. At the start of a game, offense and engines are key, but as the game progresses and you get larger ships defense becomes more and more important.