To find the range of $f(x)$, actually we need to find the maximum and minimum value.
Now
$\begin{align}f(x)&=\frac{\sqrt{3}\sin x}{2+\cos x}\\ \Rightarrow f'(x)&=\sqrt{3}\cos x \cdot \frac{1}{2+\cos x}+\sqrt{3}\sin x \cdot \frac{-\sin x}{(2+\cos x)^2}\\ &=\sqrt{3}\cdot \frac{2\cos x+\cos^2 x+\sin^2 x}{(2+\cos x)^2} \end{align}$
At the point of which $f(x)$ is maximum or minimum, the slope is $0$. $$\begin{align}\therefore f'(x)&=0\\ \Rightarrow \sqrt{3}\cdot \frac{2\cos x+\cos^2 x+\sin^2 x}{(2+\cos x)^2} &=0\\ \Rightarrow 2\cos x +1&=0;~[\because \sin^2 x+\cos^2 x=1] \\ \Rightarrow \cos x &= -\frac{1}{2}\\ \Rightarrow x &= \frac{2\pi}{3}, \frac{4\pi}{3}\end{align}$$
Now putting those values of $x$ to $f(x)$, we obtain
$f(\frac{2\pi}{3})=\frac{\sqrt{3}(\frac{\sqrt{3}}{2})}{2-\frac{1}{2}}=1$ and $f(\frac{4\pi}{3})=\frac{\sqrt{3}(-\frac{\sqrt{3}}{2})}{2-\frac{1}{2}}=-1$. It means $f(x)$ has minimum value $-1$ and maximum $1$.
$$\therefore f(x) \in [-1,1]$$
So the correct answer is C.