  In this paper we first study the generalized weighted Hardy spaces
$H^p_{L,w}(X)$ for $0<p\le 1$ associated to nonnegative self-adjoint operators
$L$ satisfying Gaussian upper bounds on the space of homogeneous type $X$ in
both cases of finite and infinite measure. We show that the weighted Hardy
spaces defined via maximal functions and atomic decompositions coincide. Then
we prove weighted regularity estimates for the Green operators of the
inhomogeneous Dirichlet and Neumann problems in suitable bounded or unbounded
domains including bounded semiconvex domains, convex regions above a Lipschitz
graph and upper half-spaces. Our estimates are in terms of weighted $L^p$
spaces for the range $1<p<\infty$ and in terms of the new weighted Hardy spaces
for the range $0<p\le 1$. Our regularity estimates for the Green operators
under the weak smoothness assumptions on the boundaries of the domains are new,
especially the estimates on Hardy spaces for the full range $0<p\le 1$ and the
case of unbounded domains.
