For this problem I'm only concerned with real solution, not complex ones. You can't take the square root of a negative number, but you can take the cube root of a negative.
For fraction, as long as the power is a reduced fraction and the denominator is odd, you can take the power of a negative number.
What about for an irrational power, such as $\sqrt{2}$? Is there a real answer to $(-2)^{\sqrt{2}}$. I can't tell because you can't rewrite it as a reduced fraction.
A negative number has a real $n$-th root if and only if $n$ is odd.
More generally, for complex numbers $x$ and $y$, $x^y$ is a multivalued function with values $\exp(y \log x)$ for any branch of $\log x$. In particular, if $x < 0$ and $y$ is real, the values of $\log x$ are $\log |x| + \pi i n$ for odd integers $n$, and there is a real value of $x^y$ if and only if $y n$ is an integer for some odd $n$. Thus $y$ must be a rational number, $p/q$ in lowest terms, whose denominator $q$ is odd.