Lemma: For any collection $\{ M_i\}_{i\in I}$ of $R$-modules, and $R$-module $N$, there is a natural isomorphism $${\rm Hom}_R(\oplus_i M_i, N)\cong \prod_i {\rm Hom}_R(M_i,N).$$ Proof: Additive functors preserve limits.
[Ref: this link, page 2.]
Q. The lemma also follows from the definition of direct sum of modules. However, the purely categorical justification given in above proof is not clear to me. Can one explain in detail the above proof?
I just started study of homological algebra, so my vocabulary of this sunbect is not so deep.
If you know that the functor $T=\operatorname{Hom}_R(-,M):R\mathtt{Mod}^{op}\to \mathtt{Ab}$ preserves limits, then the result follows. Indeed, the direct sum $\bigoplus M_i$ is just the coproduct of the $M_i$ in $R\mathtt{Mod}$ and thus the product of the $M_i$ in $R\mathtt{Mod}^{op}$, and so since $T$ preserves limits the natural map $T(\bigoplus M_i)\to \prod T(M_i)$ is an isomorphism, and this exactly gives the statement of the Lemma.
However, the justification given in the proof of the Lemma is totally wrong. Additive functors do not always preserve limits, and so you cannot use additivity of $T$ to deduce that it preserves limits. It turns out that $T$ does preserve limits, but you must prove this by other means (and given that the Lemma is just a special case of $T$ preserving limits, this doesn't actually make proving the Lemma any easier).