In most of my games I am rated near the bottom for military strength and therefore, get numerous threats and even declarations of war since everybody doesn't like me because I am weak. However, once the war starts, I almost always destroy whatever ships they send out to attack me. Most battles I win easily with a 5 to 1 or better advantage in enemy ships destroyed versus my ships destroyed. Obviously I am not as weak as they thought I was.
So, how is miltary strength calculated and what can I do to get a better strength rating? I suspect it has something to do with defenders on planets, which I almost never use. I prefer to have quick reactinig roving fleets of ships that can defend an area of multiple planets instead of wasting resources on defending each planet.