If a prime divides a product then it must divide a factor of the product [Euclid's Lemma] We have $q, p$ prime and $tq = (p-1)(p+1)$ for some positive integer $t$. The book I'm reading says that because $q$ is prime, it divides $p-1$ or $p+1$. 
Question: Why exactly does it matter that $q$ is prime here?
 A: A basic consequence of the existence and uniqueness of prime factorizations is Euclid's Lemma: if a prime $p$ divides a product then it must divide some factor. Indeed if $\, pc = ab\,$ then appending the unique prime factorizations of $a$ and $b$ necessarily yields the unique prime factorization of $ab$. By uniqueness this is the same as the factorization of $pc$ obtained similarly, where $p$ occurs, so $p$ must also occur in the prime factorization of $a$ or $b$, i.e. $\,p\mid a\,$ or $\,p\mid b.\,$ Notice the crucial role played here by uniqueness (which actually occurs more times than I mentioned explicitly). See here for a proof using gcds, and further remarks.
Conversely if $p$ isn't prime then $\,p = ab,\ a,b>1$ so  $\,p\mid ab\,$ but $\,p\nmid a\, $ (else $\,p\!=\!ab\mid a\,\Rightarrow\,b\mid 1)\,$ and similarly $\,p\nmid b,\,$ so the above fundamental  "prime divisor property" fails for composites, hence Euclid's Lemma characterizes primes (among nonzero nonuinit integers). In fact Euclid's Lemma is used as the definition of a prime in more general rings (where it is generally distinct from the property of being irreducible, i.e. having only trvial splittings where one factor is a unit).
A: Consider $q=15$ and $t=8$.  This gives $p-1=10$ and $p+1=12$.  Here, since $q$ is composite, it is possible (and has happened!) that it divides neither $p-1$ nor $p+1$, because its factors can be split between the two.  This can't happen with prime $q$: it can't be split into non-trivial factors, so it must divide one or the other.
A: If $tq$ $=$ $(p-1)(p+1)$, then $p$ $=$ $±1$ $\pmod q$ weather $p$ or $q$ are prime or not. (Since it is divisible by either factor $p-1$ or $p+1$.) Again, $(p-1)(p+1)$ is factorable into primes (Fundamental Theorem of Arithmetic) therefore $q$ may be a prime dividing $p-1$ or $p+1$ in some cases, otherwise it is a product of primes dividing $p-1$ or $p+1$. Your requirement for $p$ being prime is unessessary-- everything I had explained will still be true weather $p$ is prime or not. Note: This is also of the factorization $p^2-1$ $=$ $(p-1)(p+1)$. 
