  Our aim is to clarify the relationship between Kudla's and Bruinier's Green
functions attached to special cycles on Shimura varieties of orthogonal and
unitary type. These functions play a key role in the arithmetic geometry of the
special cycles in the context of Kudla's program.
  In particular, we show that the generating series obtained by taking the
differences of the two families of Green functions is a modular form with
trivial holomorphic projection. Along the way, we construct a section of the
Maass lowering operator for moderate growth modular forms valued in the Weil
representation using a regularized theta lift, which may be of independent
interest. We also consider arithmetic-geometric applications to integral models
of U(n, 1) Shimura varieties.
  Each family of Green functions gives rise to a formal arithmetic theta
function, valued in an arithmetic Chow group, that is conjectured to be
modular; our main result is the modularity of the difference of the two
arithmetic theta functions. Finally, we relate the arithmetic heights of the
special cycles to special derivatives of Eisenstein series, as predicted by
Kudla's conjecture, and describe a refinement of a theorem of
Bruinier-Howard-Yang on arithmetic intersections against CM points.
