Bound state energy levels $$E<0$$ of a two-dimensional hydrogen atom are determined by the Schrödinger equation $\left( -\frac{\hbar^2}{2 m} (\partial_x^2 + \partial_y^2) - \frac{q^2}{\sqrt{x^2 + y^2}} \right) \psi = E \psi \,,$ where $$m$$ and $$q$$ are the mass and charge of the electron, respectively, and $$\psi(x,y)$$ is the electronic wave function. This equation can be solved in terms of Kummer's confluent hypergeometric function (see this post for details). Here we show how the two-dimensional hydrogen atom can be mapped onto a two-dimensional harmonic oscillator. This mapping has been discussed, e.g., in Quantum Mechanics of H-Atom from Path Integrals.
We begin by making a coordinate transformation from $$(x,y)$$ to $$(u,v)$$ defined by \begin{align} x &= u^2 - v^2 , \\ y &= 2 u v \,. \end{align} From $\begin{pmatrix} \partial_u \\ \partial_v \end{pmatrix} = J \begin{pmatrix} \partial_x \\ \partial_y \end{pmatrix}$ with $J = \begin{pmatrix} \partial_u x & \partial_u y \\ \partial_v x & \partial_v y \end{pmatrix} = 2 \begin{pmatrix} u & v \\ -v & u \end{pmatrix} \,,$ it follows that $\begin{pmatrix} \partial_x \\ \partial_y \end{pmatrix} = J^{-1} \begin{pmatrix} \partial_u \\ \partial_v \end{pmatrix} = \frac{1}{2 (u^2 + v^2)} \begin{pmatrix} u & -v \\ v & u \end{pmatrix} \begin{pmatrix} \partial_u \\ \partial_v \end{pmatrix} \,,$ or \begin{align} \partial_x &= \frac{1}{2 (u^2 + v^2)} (u \partial_u - v \partial_v) \,, \\ \partial_y &= \frac{1}{2 (u^2 + v^2)} (v \partial_u + u \partial_v) \,. \end{align} It is now straightforward to show that $\partial_x^2 + \partial_y^2 = \frac{1}{4 (u^2 + v^2)} (\partial_u^2 + \partial_v^2) \,.$ Using the last equality, along with the identity $\sqrt{x^2 + y^2} = u^2 + v^2 \,,$ we rewrite the Schrödinger equation as $\frac{1}{4 (u^2 + v^2)} \left( -\frac{\hbar^2}{2 m} (\partial_u^2 + \partial_v^2) - 4 q^2 \right) \psi = E \psi \,.$ Rearranging the last equation, and keeping in mind that $$E < 0$$, we arrive at the Schrödinger equation describing a two-dimensional harmonic oscillator: $\left[ -\frac{\hbar^2}{2 m} (\partial_u^2 + \partial_v^2) + \frac{m \omega^2}{2} (u^2 + v^2) \right] \psi = \mathcal{E} \psi$ with $\omega = \sqrt{\frac{8 (-E)}{m}} \,, \qquad \mathcal{E} = 4 q^2 \,.$ It is interesting to observe that the oscillator frequency, $$\omega$$, is related to the atom energy, $$E$$, whereas the oscillator energy, $$\mathcal{E}$$, is related to the electron charge, $$q$$.
In order to obtain the energy spectrum of the two-dimensional hydrogen atom, let us recall that the allowed energy values of the oscillator are given by $\mathcal{E} = \hbar \omega (n_1 + n_2 + 1) \,,$ where $$n_1$$ and $$n_2$$ are non-negative integers. A careful consideration of the $$(x,y) \to (u,v)$$ coordinate transformation reveals that the $$(u,v)$$-coordinate wave function $$\psi$$, corresponding to the oscillator energy $$\hbar \omega (n_1 + n_2 + 1)$$, has a physically meaningful (i.e. single-valued and normalizable) pre-image in the original $$(x,y)$$ coordinates only if $$n_1 + n_2$$ is an even number, i.e. only if $$n_1 + n_2 = 2 n$$ with $$n = 0, 1, 2, \ldots \,.$$ This implies that the allowed energy levels of the hydrogen atom are determined by $$\mathcal{E} = \hbar \omega (2 n + 1)$$, or $4 q^2 = \hbar \sqrt{\frac{8 (-E)}{m}} (2 n + 1) \,.$ Solving the last equation for $$E$$, we obtain the bound state energies of the two-dimensional hydrogen atom: $E = -\frac{m q^4 / 2 \hbar^2}{\left( n + \frac{1}{2} \right)^{2}} \qquad (n = 0, 1, 2, \ldots) \,.$