Like Christopher said, it varies. One important factor to take into account: is the the original show or movie series still a going concern or not? In general, you tend to have more latitude when the show is off than the air rather than ongoing.
Case in point: When wrote my first 4400 novel, the show was still on the air so I had to be careful not to contradict or change anything (which was tricky given how serialized the show was). I basically wrote a standalone adventure that left the universe the way I found it--but, even still, I had to do multiple drafts of the outline before we worked out a plot that the licensors would approve. There was much discussion of which characters I could use, when exactly the book took place in the timeline, etc.
By the time I wrote my second 4400 book, the show had been cancelled so I was given much more freedom to wrap things up and move the plot along--because there was no longer any danger of contradicting the show.