Working in a category having products (notation $\times$) and coproducts (notation $\sqcup$) it is clear to me that a canonical arrow $w:\left(A\times C\right)\sqcup\left(B\times C\right)\to\left(A\sqcup B\right)\times C$ exists.
In an obvious way there are arrows $A\times C\to A\to A\sqcup B$ and $A\times C\to C$ leading to an arrow $u:A\times C\to\left(A\sqcup B\right)\times C$
Likewise there is an arrow $v:B\times C\to\left(A\sqcup B\right)\times C$ .
$w$ is the unique arrow characterized by $w\circ i_{1}=u$ and $w\circ i_{2}=v$.
Here $i_{1}:A\times C\to\left(A\times C\right)\sqcup\left(B\times C\right)$ and $i_{2}:B\times C\to\left(A\times C\right)\sqcup\left(B\times C\right)$ are injections.
However, I cannot find a general way back and that gives rise to my question:
Is it possible to give specific conditions under which $w$ is an invertible arrow?
Or more broadly:
Under what conditions are $\left(A\times C\right)\sqcup\left(B\times C\right)$ and $\left(A\sqcup B\right)\times C$ isomorphic?
Another way to express it:
When is there distributivity of product wrt coproduct up to isomorphisms?
edit
I should have done more effort to find this myself. Afterwards I found a this on Wikipedia. It is clear to me now that there is distibutivity if the category is cartesian closed. Nevertheless feel free to still answer my question (it is always a pleasure for me to reward). Also I add a new question and the topology tag.
Is the category of topological spaces (which is not cartesian closed) a distributive category?
The product functor $- \times C: \mathbf{Top} \to \mathbf{Top}$ preserves all coproducts. To see this, note that the canonical map $$ \textstyle w:\coprod_i (A_i \times C) \to (\coprod_i A_i) \times C $$ is basically just the identity function, sending $(a,c)$ in $A_j\times C$ to the point $(a,c)$ where now the $a$ is regarded as an element of $\coprod A_i$. From this it is pretty obvious that $w$ is a bijection. It remains to show that $w$ is an open map. To this end, let $U$ be any open set in the domain. Then $U = \coprod_i U_i$ where $U_i = U \cap (A_i\times C)$. Then $w(U) = \coprod_i w(U_i)$. Since $U_i$ is open in $A_i \times C$, the restriction $w|_{A_i \times C}$ is an embedding, and $A_i \times C$ is open in $(\coprod_i A_i) \times C$, it follows that $w(U_i)$ is open and thus $w(U)$ is open.