I was wondering if for general groups we have the relation
$$\operatorname{Hom}(G_1 \times ... \times G_k,G) \cong \operatorname{Hom}(G_1,G) \times....\times \operatorname{Hom}(G_k,G)$$ where $\operatorname{Hom}$ denotes the group of homomorphims between the respective groups
Consider $G=D_3$, the dihedral group of six elements, and $G_1=G_2=\mathbb{Z}$.
$\operatorname{Hom}(\mathbb{Z},D_3)$ has six elements, one for each possible image of $1$. So, the product of this with itself has thirty-six elements.
On the other hand, $\operatorname{Hom}(\mathbb{Z}^2,D_3)$ requires the images of $(1,0)$ and $(0,1)$ to commute with each other, since $\mathbb{Z}^2$ is commutative. By my count (looking at a multiplication table), there are only eighteen such pairs of elements.
Your statement is true if $G$ is an abelian group, however. One part of the reason is that $\operatorname{Hom}(G_i,G)$ has a natural group structure in that case (which it doesn't without $G$ abelian). Another part is that the isomorphism you describe should be for free products instead of cartesian products, but since the homomorphisms go to an abelian group, they factor through the abelianizations, and the cartesian product has the same abelianization.