What is the $\mathbb Z$-module $\operatorname{Hom}(\prod \mathbb {Z}/2, \mathbb Z/2)$? In this case I consider infinite direct product. 

By the universal property of direct product I can see $\operatorname{Hom}(B, \prod A_i)$ for particular modules $B$ and $A_i$. On the other hand, I really struggle to "see" what is the $\operatorname{Hom}( \prod A_i, B)$. I think it's hard for the general case, so I ask for the case $\operatorname{Hom}(\prod \mathbb {Z}/2, \mathbb Z/2)$.
I don't know how many copies of $\mathbb{F}_2=\mathbb{Z}/2\mathbb{Z}$ you have, but I assume that the direct product is over an infinite set $I$.  Then, $\prod_{i\in I}\,\mathbb{F}_2=\mathbb{F}_2^I$ is an $\mathbb{F}_2$-vector space of dimension $2^{|I|}$ according to this link.  Thus, $\prod_{i\in I}\,\mathbb{F}_2\cong \mathbb{F}_2^{\oplus 2^{|I|}}$ as $\mathbb{F}_2$-vector spaces.  This means
$$\text{Hom}_\mathbb{Z}\left(\prod_{i\in I}\,\mathbb{F}_2,\mathbb{F}_2\right)\cong\text{Hom}_{\mathbb{F}_2}\left(\mathbb{F}_2^{\oplus 2^{|I|}},\mathbb{F}_2\right)\cong\Biggl(\text{Hom}_{\mathbb{F}_2}\left(\mathbb{F}_2,\mathbb{F}_2\right)\Biggr)^{2^{|I|}}\cong \mathbb{F}_2^{2^{|I|}}\,.$$  Thus, the $\mathbb{Z}$-module $\text{Hom}_\mathbb{Z}\left(\prod_{i\in I}\,\mathbb{F}_2,\mathbb{F}_2\right)$ is isomorphic to the $\mathbb{Z}$-module $\mathbb{F}_2^{2^{|I|}}$, which is a $2^{2^{|I|}}$-dimensional vector space over $\mathbb{F}_2$, again according to the same link.
You write "$\prod$" yet you use the "infinite direct product" name. Usually by "$\prod$" we mean an "infinite product". For infinite direct product we use "$\bigoplus$" symbol.

Anyway since "$\bigoplus$" is a coproduct in the category of abelian groups (or $\mathbb{Z}$-modules) then

$$\hom\big(\bigoplus A_i, B\big)\simeq \prod\hom(A_i, B)$$

In particular

$$\hom\big(\bigoplus\mathbb{Z}_2, \mathbb{Z}_2\big)\simeq\prod\hom\big(\mathbb{Z}_2, \mathbb{Z}_2\big)\simeq\prod\mathbb{Z}_2$$

This doesn't hold for infinite product "$\prod$" on the left. I do not know the solution in this case (probably there is no known general one).