This is the reproducing property of the Bergman kernel in the unit disk, and it is derived in several books. It is valid for the Bergman space of square-integrable holomorphic functions in the unit disk, a weaker condition than the one you are given.
There is an ad-hoc way to check the formula as follows. Expand $f$ into a power series $f(z)=\sum\limits_{n=0}^\infty a_n z^n$ and integrate in polar coordinates, using the identity $\sum\limits_{k=0}^\infty (k+1) \zeta^k = \frac{1}{(1-\zeta)^2}$ for $|\zeta|<1$, to get
$$
\begin{align*}
\frac1\pi \iint_D & \frac{f(z)}{(1-\bar{z}w)^2} \, dx \, dy =
\frac1\pi \int_0^1 \int_0^{2\pi} \sum_{n=0}^\infty a_n r^n e^{itn}
\sum_{k=0}^\infty (k+1) r^k e^{-itk} w^k \, r \, dr \, dt \\
&=\frac{1}{\pi}\sum_{n,k=0}^\infty a_n (k+1) w^k \int_0^1 r^{n+k+1} \, dr
\int_0^{2\pi} e^{it(n-k)} \, dt
\end{align*}
$$
Now observe that the $t$-integral is $0$ whenever $n\ne k$, and is $2\pi$ otherwise, so you end up with
$$
2 \sum_{n=0}^\infty a_n (n+1) w^n \int_0^1 r^{2n+1} \, dr = \sum_{n=0}^\infty a_n w^n = f(w)
$$