The perimeter of a square is given by the formula:
\[ P = 4s \]
where \(s\) is the length of one side of the square. Given that the perimeter \(P\) is 8 cm, we can solve for the side length \(s\):
\[ 4s = 8 \implies s = \frac{8}{4} = 2 \text{ cm} \]
Next, we can find the length of the diagonal \(d\) of the square using the formula:
\[ d = s\sqrt{2} \]
Substituting \(s = 2\) cm into the formula:
\[ d = 2\sqrt{2} \text{ cm} \]
So, the length of the diagonal is \(2\sqrt{2}\) cm.
Thus, the correct answer is \(2\sqrt{2}\).