Let's fix nome notations : I write $i = i_1\vee i_2: S^k\vee S^l\to S^k\times S^l$, $j:S^{k+l-1}\to D^{k+l}$ the inclusion map, and $\varphi: S^{k+l-1}\to S^k\vee S^l$ the canonical attachment map.
By definition, $S^k\times S^l$ is obtained by attaching $D^{k+l}$ to $S^k\vee S^l$ along $\varphi$, so by definition we have the universal property : for any space $Y$, if $f: D^{k+l}\to Y$ and $g: S^k\vee S^l\to Y$ satisfy $g\circ \varphi = f\circ j$, then there is a unique $h: S^k\times S^l\to Y$ such that $f = h\circ p$ and $g = h\circ i$, where $p: D^{k+l}\to S^k\times S^l$ is the map resulting from the attachment.
Recall that if $\alpha: S^k\to X$ and $\beta: S^l\to X$, then by definition $[\alpha,\beta]$ is the homotopy class of $(\alpha\vee \beta)\circ \varphi: S^{k+l-1}\to X$.
Suppose there is such an $F$. Then this means that $\alpha\vee \beta = F\circ i$, so $(\alpha\vee \beta)\circ \varphi = F\circ i\circ \varphi$. But now $i\circ \varphi: S^{k+l-1}\to S^k\times S^l$ is homotopically trivial because $i\circ \varphi = p\circ j$ and $D^{k+l}$ is contractible, so $[\alpha,\beta]=0$.
Conversely, if $[\alpha,\beta]=0$, then it means that $(\alpha\vee \beta)\circ \varphi: S^{k+l-1}\to X$ is homotopically trivial, so it extends to a map $f: D^{k+l}\to X$. Now we can apply the universal property above with $Y=X$ and $g = \alpha\vee \beta$ to get some $F: S^k\times S^l\to X$ satisfying the factorisation we wanted.