Let f denote the above diagram. To show the colimit of f is F, we need to show: for every presheaf G on C, there is a natural bijection:

where
is the constant functor with value G and Hom on the right means the set of natural transformations. This is because the universal property of a colimit amounts to saying
is the left adjoint to the diagonal functor 
For this end, let
be a natural transformation. It is a family of morphisms indexed by the objects in I:

that satisfies the property: for each morphism
in I,
(since
)
The Yoneda lemma says there is a natural bijection
. Under this bijection,
corresponds to a unique element
. We have:

because, according to the Yoneda lemma,
corresponds to 
Now, for each object U in C, let
be the function given by
. This determines the natural transformation
; indeed, for each morphism
in I, we have:

since
. Clearly, the construction
is reversible. Hence,
is the requisite natural bijection.