I didn't encounter the Hornblower books until quite late; my early teen reading included the melodramatic saga of a seafarer on the other side of the fence, Dr Syn, the creation of actor and author Russell Thorndike. I'd probably hate them now, going by the chronology at The Life and Times of the Rev. Doctor Christopher Syn, Parson, Smuggler, and Sometime Pirate. Christopher Syn is a respectable vicar whose wife Imogene is seduced and elopes with his friend, and so Syn becomes a pirate and stalks the pair around the world for a couple of decades (the books have the essentially sexist assumption that Imogene is a passive victim in the affair). Twice in his career, Syn murders almost his whole crew by blowing up his ship when he wants to quit piracy for the time being. He is, is at the least, an antihero. Hornblower is definitely more clean-cut, and the prototype of many fictional English naval heroes of the Napoleonic period. Check out Novels of Nelson's Navy for a list of the rather varied bunch: for instance, the rather neurotic Hornblower (based on Lord Nelson and Thomas Cochrane), the ultra-confident Ramage, and the tough but intellectual Jack Aubrey (also based on Cochrane).
Hornblower's influence, however, extends outside historical genre fiction; in Ansible's Hornblower in Space, Dave Langford discusses the many overt homages in science fiction. For instance, there are A. Bertram Chandler's Captain Grimes, David Feintuch's Nicholas Seafort, and David Weber's Honor Harrington series (space opera featuring a female Hornblower, with added homage to Nelson in losing an arm and eye *). Hornblower was also an influence in the characterisation of Star Trek's Captain Kirk (see C.S. Forester, Hornblower & the Hotspur) and Captain Jean-Luc Picard (see Becoming Picard). As another example of genre-crossing, Chris Roberson's Set the Seas on Fire - see interview - looks quite interesting as a novel that's more or less "Horatio Hornblower meets H.P. Lovecraft".
Langford mentions in particular Weber's "manic determination to keep space warfare tactics as similar as possible to nautical ones" by constructing the physics and technology so that, for instance, starships have to fire broadsides through a limited number of gaps in their shields. Much the same applies in the late Barrington Bayley's excellent The Fall of Chronopolis, in which Time Fleets sail the "strat" (the substratum of unrealised events underlying time), materialising to battle face-to-face at assigned "trysts" according to strict rules of engagement; ships, when damaged, "sink" into the strat.
While these are extreme examples, a general tendency toward naval trappings for interstellar craft runs through science fiction. At some level, while it might be silly to expect historical naval uniforms, this is logical. A large spacegoing craft would have similar concerns to a terrestrial ship - a habitable craft surrounded by a hostile medium, with necessary infrastructure for propulsion, steering, defence, chain of command, etc. However, such setups often make assumptions that are archaic even now, such as need for a large crew and even the general effectiveness of "battleships" (see Starship Combat Tactics for an analysis of this, and the necessarily strange assumptions required to explain ship-to-ship combat observed in the Star Trek and Star Wars canons). NASA's Starship 2040 is NASA's extrapolation of how a commercial spacecraft would be organised in reality. It looks rather different, with a far smaller crew and most of the infrastructure handled by computer. **
Hornblower has attracted a certain amount of parody. Inside SF, there's Harry Harrison's Captain Honario Harpplayer, who is colour-blind and unable to recognise that a press-ganged crew member is a green-skinned alien. Outside: the Mr Blowhard of Stephen Leacock's 1911 Soaked in seaweed: or upset in the ocean - one of his genre parodies in Nonsense Novels (Gutenberg E-text 4682) - may well come from the same stable, although I think Leaock wasn't on top form for this story, being clearly hostile to the genre, as suggested by the ending:
I fell ill. I died. I buried myself.Would that others who write sea stories would do as much.
* Yeah, I know. Nelson didn't lose his eye. He lost the sight in his right eye at the siege of Calvi, but it wasn't disfigured and, contrary to general myth, fostered by the film That Hamilton Woman, he didn't wear an eyepatch. See The Telegraph and Fortean Times.
** Seriously interestingly, World War I battleships actually had computers. See the Argo Aim Corrector at the technology section of The Dreadnought Project, and also The Mechanical Analog Computers of Hannibal Ford and William Newell (PDF).
P.S. By coincidence, the Guardian books section just had a brief editorial In praise of ... Erskine Childers. If you're into nautical things, his The Riddle of the Sands (Gutenberg Etext 2360) is a classic for various reasons: its attention to detail, its role as an early pre-WWI invasion novel, and some say the first modern thriller.