A pseudo-metric $d$ on a group $G$ is said to be left-invariant and right-invariant respectively, if for all $a,b,x\in G$:
$$
d(ax,bx)=d(a,b)
\quad\mbox{and}\quad
d(xa,xb)=d(a,b)~.
$$
If $d$ is both right- and left-invariant, it's called
bi-invariant.
On the groups $\OO(n)$ and $\UU(n)$ the Hilbert-Schmidt norm $\norm{A}_{HS}^2\colon=\tr(AA^*)$ is bi-invariant: For all $A\in\UU(n)$ we have $A^*A=1$ and therefore
\begin{eqnarray*}
\tr((AX)(AY^*))
&=&\tr(AXY^*A^*)
=\tr(A^*AXY^*)
=\tr(XY^*)
\quad\mbox{and}\\
\tr((XA)(YA)^*)
&=&\tr(XAA^*Y^*)
=\tr(XY^*),
\end{eqnarray*}
which shows that for all $A\in\UU(n)$ the mappings $X\mapsto AX$ and $X\mapsto XA$ are isometries on $\UU(n)$ equipped with the Hilbert-Schmidt norm.