I just confirmed via an Amazon search that there is no shortage of books offering advice on TV writing. Much like with screenwriting books, it's really easy to get lost in the weeds with these. It's important to never take any book's advice as total gospel and to run as fast as possible from any book whose sales pitch is primarily "Here's how you get rich in TV!"
So in this post, I'm not looking to spotlight any books that a focused on the mechanics of writing for TV. I know they're out there, but a dozen different books can tell you the format, or you could just track down a script from one of the shows you really like. I'm much more interested in pointing you towards books that pass on some practical experience, war stories, if you will. If you want to work in TV, it's probably a good idea that you understand the kind of environment you're crawling into.
I'm fortunate enough to live near a very good library. I've almost never paid for a screenwriting book and I've almost as rarely paid for a "how to write for TV book." My first advice would be to see what tomes your local library has in stock. I don't have time to read them all, so likely there are some really good books that I won't reference below.
For a first-person look at breaking in and working on staff: Billion-Dollar Kiss: The Kiss That Saved Dawson's Creek. Jeffrey Stepakoff traces his career in television, starting with breaking in in the '80s, up to the time he was on staff during a critical season of Dawson's Creek. He's retired now, so don't expect much insight that's specific to the current TV landscape, but there's a lot of knowledge to be gleaned from his war stories.
A memoir from a man who co-created one of the most successful sitcoms of the modern era: You're Lucky You're Funny: How Life Becomes a Sitcom. This is Phil Rosenthal's account of the creation and maintenance of Everybody Loves Raymond. It's been a while since I read this one, but I remember it being an interesting look at modern TV production through the eyes of a showrunner. I didn't even watch Everybody Loves Raymond and this one kept me in.
Another memoir about becoming a working writer when your first gig was on one of the most successful shows in TV: Conversations With My Agent. Rob Long got his start on Cheers. After that, it was a fight to make sure it wasn't all downhill. As the book copy says: Getting from pitch to pilot is a tricky path to navigate successfully, from making non-negotiable changes and deal-breaking edits, combined with accommodating the whims of studios, networks and agents, often the finished product ends up a long way from where the script-writer started. With the help of his agent, her constant demands, monstrous salesmanship, brutal irony and unswerving loyalty, Long's career fluctuates from wannabe to player, from award-winning script-writer to burnt out has-been.
To better understand the business of TV: Season Finale: The Unexpected Rise and Fall of The WB and UPN. I've raved about this one before, and I consider it a remarkable look at the sorts of pressures faced by a fledgling pair of networks and how that comes to bear creatively on their shows. Network executives are often demonized as soulless "suits" out to maliciously destroy a show's uniqueness for the sake of the bottom-line, but co-author Susanne Daniels is not one of those. For my money, Daniels is one of the sharper execs out there and this book is a total steal at $.99 on Kindle.
The best behind-the-scenes episode and production guide there is: Star Trek: Deep Space Nine Companion. I'm cheating a bit because this one is out of print, and as you can see, used and new copies command a pretty high price. Still, you might find these in second-hand bookstores. This is nearly 800 pages of information about the series Star Trek: Deep Space Nine. Each episode is covered in-depth, with plenty of quotes and insights from the writing staff. It really gives you a sense of how a story takes shape and might go through multiple iterations before finally making it to screen. Most episode guides focus mostly on synopsis and trivia, but this is a book that really digs into the creation of each episode and the evolution of longer arcs. I wish every TV show was dissected as in-depth as this book does for DS9.
If you have any suggestions, please add them in the comments. Please try to keep the suggestions in the spirit of books that are either written by people who've worked in TV, or books that focus strongly on the craft of writing, not the mechanics.