Like this questioner I am trying to understand the proof of Theorem 2 of Section 5, Chapter I, of MacLane-Moerdijk's "Sheaves in Geometry and Logic".
I am wondering, how do you define the functor $L$ of the statement? It is defined for objects as a colimit over a diagram formed from the data $P$, but how is it defined on morphisms $\phi: P \to Q$? I assume I must be missing something obvious, but I am stuck.
Given a morphism $\phi:P\to Q$ in $\mathrm{Set}^{\mathcal{C}^{op}}$, we're after a morphism $L(P)\to L(Q)$ in $\mathcal{E}$. Note that if we have a cone from the diagram $A\circ\pi_P:\int P \to\mathcal{E}$ to $L(Q)$ then the fact that $L(P)$ is a colimit of the same diagram guarantees us a morphism $L(P)\to L(Q)$, so what we want to show that $\phi$ will induce such a cone.
Edit
Shortly after I wrote this post I remembered a much simpler way to show this. Let $\alpha$ and $\beta$ be the colimit cones of $L(P)$ and $L(Q)$ respectively. We make a new cone $\gamma$ from $A\circ\pi_P$ to $L(Q)$ by setting $\gamma_{(C,x)}$ equal to $\beta_{(C,\phi_C(x))}$.
Original long answer
Now notice that there is a morphism $\eta_Q$ from $Q$ to $\hom_\mathcal{E}(A(-),L(Q))$ that takes a component of the cone $\mathbf{y}\circ\pi_Q\dot{\to} Q$ to the corresponding component over $L(Q)$ (I won't write out the details of naturality here, as they get a bit tedious). This means that one can take the components of the cone $\mathbf{y}\circ\pi_P\dot{\to}P$ and compose each with $\eta_Q\circ\phi$. The result is also a cone, $\mathbf{y}\circ\pi_P\dot{\to}\hom_\mathcal{E}(A(-),L(Q))$. Since each of these components are morphisms in $\mathrm{Set}^{\mathcal{C}^{op}}$ with representable domains, each component of this latter cone with domain $\mathbf{y}C$ corresponds to a morphism $A(C)\to L(B)$ which some computations will show are also the components of the desired cone $A\circ\pi_P\dot{\to}L(Q)$ in $\mathcal{E}$.