What determines if a ship is attack or defense?
I can't say for certain, but as you suspect, it appears to be whether the ship's attack is larger or smaller then its defense.
Would only have defense ships keep my military raiting low?
I don't think so, but I can't remember the exact formula. Defense is definitely factored in, though.
One final question, do computers ever use anything but missiles? Every faction is spamming missile boats.
The AI doesn't favor any one type of weapon. In most of my games, there is a predominant weapon type used by a majority of the AIs, but usually there will be at least one race using each type of weapon. Typically, the evil races will use a different type of weapon than the rest, though that might just be a coincidence.