The direction cosines of a line, denoted by \( l, m, n \), satisfy the condition:
\[
l^2 + m^2 + n^2 = 1.
\]
Here, the direction cosines are \( l = \sqrt{3}k \), \( m = \sqrt{3}k \), and \( n = \sqrt{3}k \). Substituting these into the equation:
\[
(\sqrt{3}k)^2 + (\sqrt{3}k)^2 + (\sqrt{3}k)^2 = 1.
\]
Simplify the terms:
\[
3k^2 + 3k^2 + 3k^2 = 1,
\]
\[
9k^2 = 1.
\]
Solve for \( k^2 \):
\[
k^2 = \frac{1}{9}.
\]
Take the square root on both sides:
\[
k = \pm \frac{1}{3}.
\]
Hence, the value of \( k \) is (D) \( \pm \frac{1}{3} \).