Beta function
I see @robjohn beat me to it. The substitution is slightly different, so here it is.
Here's a simple approach using the beta function.
First, notice the integral diverges logarithmically for $n=1$, since the integrand goes like $1/x$ for large $x$.
Let $t=x^2$. Then $\begin{eqnarray*} \int_0^\infty dx\, \frac{x^{1/n}}{1+x^2} &=& \frac{1}{2}\int_0^\infty dt\, \frac{t^{(1-n)/(2n)}}{1+t} \\ &=& \frac{1}{2} \textstyle B\left(\frac{1}{2} + \frac{1}{2n}, \frac{1}{2} - \frac{1}{2n}\right) \\ &=& \frac{1}{2} \textstyle\Gamma\left(\frac{1}{2} + \frac{1}{2n}\right) \Gamma\left(\frac{1}{2} - \frac{1}{2n}\right) \\ &=& \frac{\pi}{2 \sin\left(\frac{\pi}{2} + \frac{\pi}{2n}\right)} \\ &=& \frac{\pi}{2} \sec \frac{\pi}{2n}. \end{eqnarray*}$
Some details
Above we use the integral representation for the beta function $B(x,y) = \int_0^\infty dt\, \frac{t^{x-1}}{(1+t)^{x+y}}$ for $\mathrm{Re}(x)>0$, $\mathrm{Re}(y)>0$. We also use Euler's reflection formula, $\Gamma(1-z)\Gamma(z) = \frac{\pi}{\sin\pi z}.$
Addendum: A method with residue calculus
Let $t = x^{1/n}$. Then $\begin{eqnarray*} I &=& \int_0^\infty dx\, \frac{x^{1/n}}{1+x^2} \\ &=& n\int_0^\infty dt\, \frac{t^n}{t^{2n}+1} \end{eqnarray*}$ Notice the last integral has no cuts for integral $n$. The residues are at the roots of $t^{2n}+1=0$. Consider the pie-shaped contour with one edge along the positive real axis, another edge along the line $e^{i\pi/n}t$ with $t$ real and positive, and the "crust" at infinity.
$\hspace{4.5cm}$
There is one residue in the contour at $t_0 = e^{i\pi/(2n)}$. The integral along the real axis is just $I$. The integral along the other edge of the pie is $\begin{eqnarray*} I' &=& n\int_\gamma dz\,\frac{z^n}{z^{2n}+1} \\ &=& n \int_\infty^0 dt e^{i\pi/n} \frac{t^n e^{i\pi}}{t^{2n}+1} \\ &=& -e^{i(n+1)\pi/n} I. \end{eqnarray*}$ The integral along the crust goes like $1/R^{2n-1}$ as the radius of the pie goes to infinity, and so vanishes in the limit. Therefore, $\begin{eqnarray*} I + I' &=& 2\pi i \,\mathrm{Res}_{t=t_0}\, \frac{t^n}{t^{2n}+1} \\ &=& 2\pi i \frac{t_0^n}{2n t_0^{2n-1}}. \end{eqnarray*}$ Using this and the formula for $I'$ in terms of $I$ above we find $I = \frac{\pi}{2} \sec \frac{\pi}{2n},$ as before.