The answer below is incomplete; it uses a standard method for evaluating the principal value of a contour integral, but fails for reasons I can't quite understand. Any comments to fix it, or pointing out why it's fatally flawed, would be appreciated.
The simplest way is to use the residue theorem. To apply this, consider the contour in the complex plane of the following form:
- I. From $z = +\epsilon$ to $z = R$, along the real axis
- II.From $z = R$ to $z = -R$, in a semi-circle centered at $z = 0$ in the upper half of the complex plane
- III. From $z = -R$ to $z = - \epsilon$, along the real axis
- IV. From $z = - \epsilon$ to $z = + \epsilon$, in a semi-circle centered at $z = 0$ in the upper half of the complex plane.
Consider the integral of the functions $f(z) = e^{iz}/z^n$ along this contour. Note that $\sin z/z^n$ is the imaginary part of $f(z)$.
In the limit $\epsilon \to 0$ and $R \to \infty$, the contributions from portions I and III of the contour become the Cauchy principal value of this integral. Moreover, since $f(z)$ converges to 0 as $z \to \infty$ in any direction in the upper half-plane, the integral over portion $II$ of the contour will go to zero in this limit. Finally, we note that this function does not contain any poles in the upper half-plane, so the integral around our contour will be zero. Putting this all together, we conclude that
$$
\mathrm{P}\int_{-\infty}^\infty f(z) \, dz + \lim_{\epsilon \to 0} \int_{III} f(z) \, dz = 0.
$$
So to find the Cauchy principal value, we must perform the integral around the small semi-circle in a clockwise direction. Along this curve, we have $z = \epsilon e^{i \phi}$, with $\phi$ running from $\pi$ to $0$. Thus,
$$
\int_{III} f(z) \, dz = \int_{\pi}^0 f(\epsilon e^{i \phi}) \left( \epsilon i e^{i \phi} \right) \, d \phi.
$$
Now, if we expand $f(z)$ in a Laurent series about $z = 0$, we have
$$
f(z) = \sum_{m = 0}^\infty \frac{i^m z^{m-n}}{m!}
$$
and so
$$
f(\epsilon e^{i \phi}) \left( \epsilon i e^{i \phi} \right) = \sum_{m = 0}^\infty \frac{i^{m+1} \epsilon^{m-n+1}}{m!} e^{i \phi (m -n + 1)}.
$$
Thus,
$$
\int_{\pi}^0 f(\epsilon e^{i \phi}) \left( \epsilon i e^{i \phi} \right) \, d \phi = \sum_{m = 0}^\infty \left[ \frac{i^{m+1} \epsilon^{m-n+1}}{m!} \int_\pi^0 e^{i \phi (m - n + 1)} d \phi \right].
$$
For $m - n + 1 \neq 0$, this integral becomes
$$
\int_\pi^0 e^{i \phi (m - n + 1)} d \phi = \begin{cases}
2 /i(m - n + 1) & m - n \text{ even} \\
0 & m - n \text{ odd}
\end{cases} \\
$$
while for $m - n + 1 = 0$, the integral is simply $-\pi$. Thus, we have
$$
\int_{III} f(z) \, dz = -\frac{\pi i^{n}}{(n-1)!} + 2\sum_{m -n \text{ even}}^\infty \frac{i^{m} \epsilon^{m-n+1}}{m!(m-n+1)}
$$
If $n$ is even, then all the terms in this expression will be real, and so the imaginary part will vanish. If $n$ is odd, then this expression will be purely imaginary, so we have
$$
\Im \int_{III} f(z) \, dz = -\frac{\pi i^{n-1}}{(n-1)!} +2\sum_{m -n \text{ even}}^\infty \frac{i^{m-1} \epsilon^{m-n+1}}{m!(m-n+1)}
$$
The limit of this integral, unfortunately, is not well-defined as $\epsilon \to 0$; all the terms in the sum with $m < n - 1$ will diverge, due to the factor of $\epsilon^{m-n+1}$. (This is ultimately due to the fact that the function does not have a simple pole at $z = 0$, but rather a pole of order $n-1$.)
However, if one uses a nonstandard principal-value prescription that allows us to simply discard all the $\epsilon$-dependent terms, one does in fact obtain
$$
\mathrm{P}\int_{-\infty}^\infty \frac{\sin x}{x^n} \, dx = - \Im \int_{III} f(z) \, dz = \frac{\pi (-1)^{(n-1)/2}}{(n-1)!}
$$
as desired. I don't think that this is the usual way that it's done, but it's possible that the reference you are working from defines things in a non-standard way. (It's also possible that I've made an error in my derivation, and I welcome corrections in the comments.)