If you check the copyright page, you'll see that all tie-in books are copyrighted in the name of the licensor. The writers are just hired guns, like Christopher said. All rights belong to CBS or whomever.
Things are different in the UK, which makes for some interesting phenomena. PAD can't licence a series of Mackenzie Calhoun novels set in Thallonian space with no mention of Starfleet, the Federation, or other bits of Trek established on TV or in movies. However, in the UK, that sort of thing can and does happen. Characters and elements from Doctor Who novels have been spun off into independent book lines not officially linked to the series or licenced by the BBC: Bernice Summerfield, Faction Paradox, Time Hunter, Iris Wildthyme...
The BBC owns the Doctor Who aspects of a tie-in novel, more or less, and the author owns what he or she creates. That's made the Doctor Who universe a richer and more wonderful place.
That's how things sometimes work in the US, if the publisher happened to have hired the author as an independent contractor rather than under a work-for-hire contract. That's why, for example, the courts have upheld that the estates of Jerry Siegel and Joe Shuster own the rights to all concepts and ideas presented in Action Comics #1, because DC used an independent contracting arrangement with Siegel and Shuster in that first issue. But work-for-hire is so much more advantageous to the publisher in most situations that few if any publishing companies hire authors in licensed work as independent contractors.