I'm getting the wrong answer for $\theta$. What am I doing wrong?
$$(4,-4{\sqrt3}, 6)$$ $$r =\sqrt{4^4 + (-4\sqrt{3})^2} = 8$$ $$z = 6$$ $$\tan\theta=\frac{-4\sqrt{3}}{4}$$ $$\tan\theta=-\sqrt{3}$$ $$\theta=\arctan-\sqrt{3}$$ $$\theta=-1.047$$
But the right answer is $\frac{5\pi}{3}$, which is $5.236$. Where is my mistake?
As I have said, you have found the correct quadrant for the tangent. But you have found a $\theta$ from $\arctan$ which is outside $[0,2\pi)$. Back to you step,
$$\begin{align} \tan \theta =& -\sqrt3\\ \theta =& n\pi + \arctan \left(-\sqrt3\right) &\text{for integer }n\\ =& n\pi - \frac{\pi}{3}\\ =& \frac{(3n-1)\pi}{3} \end{align}$$
As you have correctly figured out, $\theta$ is in the fourth quadrant. This eliminates the possible values of $\theta$ to $2n\pi-\dfrac{\pi}{3} = \dfrac{(6n-1)\pi}{3}$. Secondly, $0\le \theta<2\pi$, so
$$\begin{array}{rcl} 0\le&\frac{(6n-1)\pi}{3}&<2\pi\\ 0\le&\frac{6n-1}{3}&<2\\ 0\le&6n-1&<6\\ \frac{1}{6}\le&n&<\frac76 \end{array}$$
and so $n=1$. $\theta = \dfrac{(6n-1)\pi}{3} = \dfrac{5\pi}{3}$.