In Tom Dieck's Algebraic Topology pg29, he wrote, (hTop is category with topological spaces as objects, homotopy equivalence classes as morphisms. Here $[X,Y]$ denotes $Hom_{hTop}(X,Y)$. )
Homotopy is compatible with sums and products. Let $i_k :X_k \rightarrow \coprod X_j$ be injection. Then $$[\coprod X_j, Y] \rightarrow \prod [X_j,Y], [f] \mapsto [f \circ i_k ]$$ is a well defined bijection. In otherwords, sum in Top represent sum in hTop.
Why is it a bijection?
I get that it is a surjection.
Surjectivity: Let $Y$ be an object in hTop, $([f_j)] \in \prod [X_j,Y]$ (setwise product). Picking representative $f'_j \in [f_j]$, exists $f: \coprod X_j \rightarrow Y$, such that $f \circ i_k = f'_k$, hence same for its homotopy class.
Injectivity (Incomplete): Suppose exists $g: \coprod X_j \rightarrow Y$, such that $g \circ i_j = f''_j \in [f_j]$. Such that $G_j: X_j \times [0,1] \rightarrow Y$, with $G_j: f'_j \simeq f''_j$. Exists map, $ \coprod G_j: \coprod (X_j \times [0,1]) \rightarrow Y $. But we need a map $\Big( \coprod X_j \Big) \times [0,1] \rightarrow Y$ for $g \simeq f$ which I don't see how to complete.
As the comment by Tyrone suggested you have a bijection between the homotopies of maps $(\coprod X_i) \rightarrow Y$ and collections of homotopies of maps $X_i \rightarrow Y$.
So to complete your proof of injectivity you have just to glue together the homotopies $G_j$ to get one between the maps $g$ and $f$.
I will made explicit the bijection I claimed: take an homotopy $H \colon (\coprod_i X_i) \times [0,1] \rightarrow Y$, by the homeomorphism $(\coprod_i X_i)\times [0,1] \cong \coprod_i X_i \times [0,1]$ we obtain a map $H' \colon \coprod_i X_i \times [0,1] \rightarrow Y$. Now by the universal property of the coproduct we have that this corresponds uniquely to a collection of maps $G_i \colon X_i \times [0,1] \rightarrow Y$.
Notice that in this construction I used precomposition with an isomorphism and the universal property of the coproduct to get a map of sets $Hom((\coprod_i X_i)\times [0,1],Y ) \cong Hom(\coprod_i X_i \times [0,1],Y ) \cong \prod_i Hom(X_i \times [0,1], Y)$ which is composition of two bijections, thus a bijection.
But you can also write explicitly the inverse.