As the other answer suggested, it is necessary that $\varphi(m)=\varphi(n)$ for $U(m)$ and $U(n)$ to be isomorphic, however, it is not sufficient.
I am making an attempt at finding a sufficient condition.
Theorem: $U(m_1 m_2)\cong U(m_1)\times U(m_2)\tag*{}$ if and only if $\text{gcd}(m_1,m_2)=1$.
Using induction, you may as well extend this theorem.
Theorem 1: $U(m_1m_2\cdots m_k)\cong U(m_1)\times U(m_2)\times \ldots \times U(m_k)\tag*{}$ if and only if $\text{gcd}(m_i, m_j)=1$ whenever $i\neq j$.
Theorem 2: $U(n)$ is cyclic i.e., $U(n)\cong C_{\varphi(n)}\tag*{}$ if and only if $n$ is of the form $1$, $2$, $4$, $p^k$ or $2p^k$ where $p$ is an odd prime and $k\in \mathbb Z^+$.
Theorem 3: $U(2^n)\cong C_{2^1}\times C_{2^{n-2}}\tag*{}$ for all integers $n\geq 2$.
With this in mind, if you are given two numbers $m$ and $n$, in most of the cases, you can factorise $U(m)$ and $U(n)$ as direct product of cyclic groups using these theorems.
Example 1: $\varphi(8)=\varphi(10)=\varphi(12)=4$
$8=2^3$ (use theorem 3), $10=2\times 5$ (use theorem 2) and $12=2^2\times 3$ (use theorem 1 then 3 and 2).
$U(8)\cong C_2\times C_2\tag*{}$
$U(10)\cong C_4\tag*{}$
$U(12)\cong U(4)\times U(3) \cong C_2\times C_2\tag*{}$
Hence, $U(8)\cong U(12)\not \cong U(10)$.
Example 2: $\varphi(41)=\varphi(100)=40$
$U(41)\cong C_{40}\tag*{}$
$U(100)\cong U(4)\times U(5^2) \cong C_2\times C_{20}\tag*{}$
Recall the Chinese remainder theorem, $\mathbb Z_m\times \mathbb Z_n\cong \mathbb Z_{mn}$ if an only if $\text{gcd}(m,n)=1$.
Hence, $U(41)\not \cong U(100)$.
Example 3: $\varphi(44)=\varphi(33)=20$
$U(44)\cong U(2^2)\times U(11)\cong C_{2}\times C_{10}\tag*{}$
$U(33)\cong U(3)\times U(11) \cong C_2\times C_{10}\tag*{}$
Hence, $U(44) \cong U(33)$.
Example 4: $\varphi(64)=\varphi(68)=32$
$U(64)\cong C_{2}\times C_{2^4}\tag*{}$
$U(68)\cong U(4)\times U(17) \cong C_2\times C_{16}\tag*{}$
Hence, $U(64) \cong U(68)$.
Example 5: $\varphi(70)=\varphi(45)=24$
$U(70)\cong U(2)\times U(5)\times U(7)\cong C_{1}\times C_{4}\times C_{6}\tag*{}$
$U(45)\cong U(3^2)\times U(5) \cong C_{6}\times C_{4}\tag*{}$
Hence, $U(70) \cong U(45)$.
Example 6: $\varphi(69)=\varphi(92)=44$
$U(69)\cong U(3)\times U(23) \cong C_{2}\times C_{22}\tag*{}$
$U(92)\cong U(4)\times U(23) \cong C_{2}\times C_{22}\tag*{}$
Hence, $U(69) \cong U(92)$.
I will update this answer with more rigorous step by step procedure, if possible.