  The rare radiative $B$-meson decay $B^-\to\gamma\ell^-\bar\nu$ and the
radiative Higgs-boson decay $h\to\gamma\gamma$ mediated by light-quark loops
both receive large logarithmic corrections in QCD, which can be resummed using
factorization theorems derived in soft-collinear effective theory. In these
factorization theorems the same radiative jet function appears, which is a
central object in the study of factorization beyond the leading order in scale
ratios. We calculate this function at two-loop order both in momentum space and
in a dual space, where its renormalization-group evolution takes on a simpler
form. We also derive the two-loop anomalous dimension of the jet function and
present the exact solution to its evolution equation at two-loop order. Another
important outcome of our analysis is the explicit form of the two-loop
anomalous dimension of the $B$-meson light-cone distribution amplitude in
momentum space.
