Solution (source code)

= Solution

For each <algebra for a monad> $(A,a)$, consider the specific pair in $\mathcal D$
$$
FTA\mathrel{\substack{\xrightarrow{Fa}\\\xrightarrow[\varepsilon_{FA}]{} }}FA.
$$
Then the exact condition is
$$
\boxed{K\text{ has a left adjoint}\quad\Longleftrightarrow\quad
\text{each of these pairs has a coequalizer in }\mathcal D.}
$$
Each pair is reflexive, with common section $F\eta_A$: the two composite identities follow from $a\eta_A=1_A$ and $\varepsilon_{FA}F\eta_A=1_{FA}$. Thus existence of all <reflexive coequalizers> is sufficient, but the displayed specified pairs give the necessary-and-sufficient condition.

To prove it, take $h:FA\to d$ and its adjoint transpose $x=Gh\eta_A:A\to Gd$. The transpose of $hFa$ is $xa$, by <naturality> of $\eta$. The transpose of $h\varepsilon_{FA}$ is
$$
GhG\varepsilon_{FA}\eta_{TA}=Gh\mu_A\eta_{TA}=Gh.
$$
Moreover counit <naturality> and a triangle identity give
$$
G\varepsilon_d T x
=G\varepsilon_d,GF(Gh\eta_A)
=Gh,G\varepsilon_{FA},GF\eta_A=Gh.
$$
Because transposition is bijective, the coequalizing equation is therefore equivalent to
$$
hFa=h\varepsilon_{FA}\quad\Longleftrightarrow\quad xa=G\varepsilon_d T x.
$$
The right side says exactly that $x:(A,a)\to Kd$ is a <monad algebra morphism>.

For sufficiency, choose a <coequalizer> $q_a:FA\to L(A,a)$ for every <monad algebra>. Its <universal property> and the equivalence just proved give <natural bijections>
$$
\mathcal D(L(A,a),d)\cong
\{h:FA\to d:hFa=h\varepsilon_{FA}\}
\cong\mathcal C^T((A,a),Kd).
$$
To see explicitly that the chosen objects form a <functor>, an <monad algebra> <morphism> $u:(A,a)\to(B,b)$ makes $q_bFu$ coequalize the pair for $a$: use $ua=bTu$ and <naturality> of the counit. Hence there is a unique $Lu$ with $Lu\,q_a=q_bFu$. Uniqueness proves its identity and composition laws and the <naturality> of the displayed <bijections>. Thus $L\dashv K$.

Conversely, suppose $L\dashv K$ with unit $\lambda_{(A,a)}:(A,a)\to KL(A,a)$. Transpose its underlying arrow $A\to GL(A,a)$ through $F\dashv G$ to obtain $q_a:FA\to L(A,a)$. Since the unit is an <monad algebra> <morphism>, the equivalence above shows that $q_a$ coequalizes the specified pair. Any coequalizing $h:FA\to d$ transposes to an <monad algebra> map $(A,a)\to Kd$, which factors uniquely through the unit by $L\dashv K$. Transposing back gives a unique factorization of $h$ through $q_a$. Thus $q_a$ is the required <coequalizer>. This proves both directions of the <Left adjoint to the Eilenberg-Moore comparison functor> criterion.