Hard science fiction , often abbreviated as Hard SF, is a category of science fiction characterized by an emphasis on scientific accuracy and problem solving, and often (although not necessarily always) associated with a complementary lack of development of the characters, social setting, and human side of the story. (These problems also appear in Military SF)
The complementary term soft science fiction, formed by analogy to hard science fiction, first appeared in the late 1970s. and originally was used by analogy with the distinction between the “hard” (natural) and “soft” (social) sciences.
More recently, “soft science fiction” has been applied to popular movie and TV scifi, in which there is little or no attempt at scientific verisimilitude. Several people including myself have created rankings of science fiction from soft to hard. But while there is no denying Kim Stanley Robinson’s Mars Trilogy is more realistic than Guardians of the Galaxy. many of the finer subdivisions of soft to hard science fiction are arbitrary and shouldn’t be taken too seriously. In general, Space Opera, especially tv/movie and movie-inspired Space Opera, tends to the softer end of the realism scale, although in the last few decades there has been a revival of more realistic space opera.
Quoting Wikipedia: “There is a degree of flexibility in how far from “real science” a story can stray before it leaves the realm of hard SF. Some authors scrupulously avoid such technology as faster-than-light travel, while others accept such notions (sometimes referred to as “enabling devices”, since they allow the story to take place) but focus on realistically depicting the worlds that such a technology might make possible. In this view, a story’s scientific “hardness” is less a matter of the absolute accuracy of the science content than of the rigor and consistency with which the various ideas and possibilities are worked out.”
Cyberpunk is also often considered a form of Hard SF but I disagree with this assessment because Cyberpunk doesn’t feature the classic theme of scientific rigor and technical and logical problem solving.