Let $G = SL_{2}(\mathbb{R})$ and $\Gamma = \Gamma_{0}(N)$. Every element $g =\begin{pmatrix}a & b\\ c& d\end{pmatrix}\in G$ can be written as $$\begin{pmatrix} y^{1/2} & xy^{-1/2} \\ 0 & y^{-1/2}\end{pmatrix}\begin{pmatrix} \cos\theta & -\sin\theta \\ \sin\theta & \cos\theta \end{pmatrix}$$ for some $x, y, \theta$. Therefore we can associate each $g \in G$ with $(x, y, \theta)$ with $x \in \mathbb{R}$, $y > 0$, and $\theta \in [0, 2\pi]$. With $g$ as defined above, $z = x + iy = g(i)$ and $\theta = \arg(ci + d)$. For each $f \in S_{k}(\Gamma)$, define $\phi_{f}(g)$ on $G$ by $\phi_{f}(g) = f(g(i))j(g, i)^{-k}$ where $j(g, i) = (ci + d)(\det g)^{-1/2}$. We consider the Haar measure on $\Gamma$ and $\Gamma\backslash G$.
My question is: Why can we normalize the Haar measure on $G$ through the formula $$\int_{G}\phi_{f}(g)\, dg = \frac{1}{2\pi}\int_{0}^{2\pi}\int_{0}^{\infty}\int_{-\infty}^{\infty} \phi_{f}(x, y, \theta)\, \frac{dxdy}{y^{2}}\, d\theta,$$ what is the reasoning behind this formula? Also why does this imply that $$\int_{\Gamma\backslash G} |\phi_{f}(g)|^{2}\, dg = \iint_{F} |f(z)|^{2} y^{k}\frac{dxdy}{y^{2}}$$ where $F$ is the fundamental domain for $\Gamma$ in the upper half plane.
This is the Iwasawa decomposition. Have a look at chapter 1 in Deitmar Echterhoff, I guess the section is called "Quotient integral formulas". Especially the first theorem and the last proposition are usefull.
They specialize to the above theorem, if you make everythink explicit.
The book has also a section about the Selberg trace formula (Chapter 9), where they proof a bunch of integral formulas for $SL(2, \mathbb{R})$, but I do not remember, if the above is contained in there.
Lang $SL(2, R)$ is another place, where you might want to look (pg.37).