  Let $\Omega\subsetneq\mathbb R^{n+1}$ be open and let $\mu$ be some measure
supported on $\partial\Omega$ such that $\mu(B(x,r))\leq C\,r^n$ for all
$x\in\mathbb R^{n+1}$, $r>0$. We show that if the harmonic measure in $\Omega$
satisfies some scale invariant $A_\infty$ type conditions with respect to
$\mu$, then the $n$-dimensional Riesz transform $$R_\mu f(x) = \int
\frac{x-y}{|x-y|^{n+1}}\,f(y)\,d\mu(y)$$ is bounded in $L^2(\mu)$. We do not
assume any doubling condition on $\mu$. We also consider the particular case
when $\Omega$ is a bounded uniform domain. To this end, we need first to obtain
sharp estimates that relate the harmonic measure and the Green function in this
type of domains, which generalize classical results by Jerison and Kenig for
the well-known class of NTA domains.
