In general, this doesn't hold for diagonal matrices $A$ in general. 

Consider
$$A=\begin{bmatrix} 1 & 0 &0 \\0 & 2 &0 \\ 0& 0& 3 \end{bmatrix}$$
and
$$U = \begin{bmatrix} 0 &0 & 1 \\1 & 0 &0 \\ 0& 1&0 \end{bmatrix}$$
Then
$$UAU^\mathrm{t}=\begin{bmatrix}
 3 & 0 & 0 \\
 0 & 1 &0  \\
 0 & 0 & 2 \\
\end{bmatrix} \neq A$$

Given any diagonal $A$ with 3 distinct eigenvalues, the permutation matrix $U$ (a matrix in the natural image of $S_3$) will act non-trivially by conjugation.

To better understand the case of a trivial action by conjugation. Consider the following. 

 If $UAU^\mathrm{t}=A$, then $UA=AU$; so $A$ commutes with all orthogonal matrices and must be a multiple of the identity matrix. To see this more clearly, suppose $v$ is an eigenvector of $A$ with eigenvalue $\lambda$. Then for all $u\in\mathbb{R}^3$ there is an orthogonal matrix $U$ such that $Uv=u$ (and thus $U^\mathrm{t}u=v$), and $$Au=UAU^\mathrm{t}u=UAv=\lambda Uv=\lambda u,$$ so every vector is an eigenvector of $A$ with eigenvalue $\lambda$. Thus $A=\lambda I$.