Huh, one of my favorite authors, Martha Wells, turns out to be writing Stargate Atlantis books.
My knee-jerk reaction to mainstream or semi-mainstream authors writing books ”for shows” instead of on their own is usually “yuck.” Then I remember some non-yuck, definitely worthwhile stuff written for the various SF universes, including -
John M. Ford, Star Trek, How Much for Just the Planet? [Hilarious, well worth tracking down]
Larry Niven, Star Trek Log (the animated half-hour series), The Soft Weapon (after a short story of the same name).
James Blish, lots of script adaptations of the original Star Trek.
Greg Bear, lots of books in the Star Wars universe [which normally I can't stand]
I’m sure there are other fine examples. (Note that the Serenity script adaptation was a miserable piece of poo. They should have had Bujold or Varley or even - God help me – Ellison pen the damned thing).