Stories of valiant spacefarers are making a comeback in science-fiction publishing, while space-war novels still have a healthy niche. Both space opera and military science fiction share similar icons, so why are they considered separate?
Space opera is best described as a genre of science fiction that is about adventure, often pitting the protagonists against powerful opponents, with broad themes, characterizations and actions throughout. The actual science that defines science fiction is not necessarily at the forefront of the story.
Military science fiction, on the other hand, is about conflict of the worst kind, involving all-out warfare. Oftentimes, the main characters are part of a military organization and are involved in conflicts much greater than their own parts, but they might be pivotal to the overal conflict to some degree.
To be very fair, there is a lot of overlap between the two different sub-genres. Stories that may fall firmly within the space opera side may also carry elements of military science fiction, whereas the opposite is very true, in a number of cases.
Of all the space opera stories that come to mind, Star Wars is right up there at the front, although that's not necessarily the first one out there. Physical flaws aside, the six films span a very epic story of the rise and fall of Anakin Skywalker and his redemption. We see the fall of a massive government undermined from within, the rise and fall of an Empire and the rise and realization of new heroes and destinies, all set in front of a backdrop of a series of galactic wars. While combat is certainly one of the most intensive, exciting and interesting parts of the Star Wars saga, I've never really thought of it as a strictly military story.
The intentions and themes between the two genres are what often sets them apart. Military science fiction tends to attempt to provide commentary on real-world events, placing the conflict out of context for readers to pick on on themes that mirror those found in real life. Starship Troopers looked out of the Second World War, and examined themes such as facism and a society where all-consuming, total war was necessary. World War Two was the closest that the United States and the world has ever come to a total war, and it is unsurprising that these themes would be at the forefront of authors' minds. Beyond that, however, there is a larger theme that I've often found within most of the military science fiction stories that I've read, and it parallels the sort of mentality that is required in a military force - the Other.
For a military to function, there is an absolute requirement of cohesion, of uniformity and of discpline. During the 1300s to the 1400s, an event in Europe occured, now refered to as the military revolution, when European armies adopted rank and file formations, formalized and standarized training and uniforms, all stemming from the invention of the firearm. Armies seek to break up individuality and provide a group mentality, of teamwork. Otherwise, it would be unable to function correctly. In doing, so, enemies are vilified - just look at what enemy Japanese, German, Vietnamese and Iraqi soldiers have been called in recent conflicts - and in doing so, they are labeled the Other. They are against what you are against, and oftentimes, the others in military SF stories are portrayed as insectoids, an extremely alien figure, completely dehumanized. Protagonists often reconcile or examine these relationships and their role in any interactions, whether it's questioning whether their duties are right and justified, or even looking at this dehumanization and uniformity within society. Othertimes, such as in Timothy Zahn's Cobra books or Ender's Game, the central characters themselves are the others - changed by their training and/or enhancements, that place them at odds with society.
In contrast, Space Opera is about construction, inclusion. Where Starship Troopers looked at the world aflame after the Second World War, Asimov's Foundation Trilogy looked at the world rebuilt, watching as a society fell apart, and was restored through the actions of the characters. While military actions or simple melees have often been a part of these stories, they lack the central elements (although they might incorporate them) that define military science fiction. Other broad themes are incorporated as well - the swell of discovery, seen throughout the Ringworld stories, is another major theme that I would like to point to. In some of the more sophisicated modern stories, such as Singularity Sky and Iron Sunrise by Charles Stross, we witness the efforts of humanity to rebuild under strict guidelines of the Singularity, with broad politicial overtones, punctuated by action and excitement.
Both military science fiction and space opera are about culture, but it is the methods in which they both approach their stories that helps to set them apart. space opera looks to culture through the eyes of construction, of vast worlds and the connections that hold society together, overall looking to inclusion, while Military science fiction examines what happens when those bonds break, and the disintigration of society, and seeking to examine the exclusions found in society.
Star Wars concept art above by Ryan Church.