The present paper concerns divergence form elliptic and degenerate elliptic operators in a domain Ω⊂Rn, and establishes the equivalence between the uniform rectifiability of the boundary E=∂Ω and weak Carleson condition on the good approximation of the Green function G by affine, or distance, functions. There are two main original contexts for the results, elliptic operators in a non-tangential access domain with an n−1 dimensional boundary and degenerate elliptic operators adapted to a domain with an Ahlfors regular boundary of larger co-dimension. In both cases necessary and sufficient conditions are given, in the form of Carleson packing conditions on the collection of balls centered on E where G is not well approximated.(1)This is the first time the underlying property of the control of the Green function by affine functions, or by the distance to the boundary, in the sense of the Carleson prevalent sets, appears in the literature; some results established here are new even in the half space;(2)the results are optimal, providing a full characterization of uniform rectifiability under the (standard) mild topological assumptions;(3)to the best of the authors' knowledge, even in traditional domains with (n−1)-dimensional boundaries, this is the first free boundary result applying to all elliptic operators, without any restriction on the coefficients (the direct one assumes the standard, and necessary, Carleson measure condition);(4)this is the first free boundary result in higher co-dimensional setting and as such, the first PDE characterization of uniform rectifiability for a set of dimension d, d<n−1, in Rn. The paper offers a general way to deal with related issues considerably beyond the scope of the aforementioned theorem, including the question of approximability of the gradient of the Green function, and the comparison of the Green function to a certain version of the distance to the original set rather than distance to the hyperplanes.