Given a left invariant vector field (livf) $X$ on $G$, we can create a livf on $G\times H$ as follows. We define $\widehat{X}_{(g,h)} = (L_{(e,h)})_\ast i_\ast X_g$ where $i$ is the inclusion $i:G\rightarrow G\times \{e\}\subseteq G\times H$ and $L$ is left multiplication. I'll leave it to you to show $\hat{X}$ really is left invariant.
Similarly, we can push livfs on $H$ forward to $G\times H$. I'll write this as $Y\mapsto \widetilde{Y}$.
This gives a map $\phi:Lie(G)\times Lie(H)\rightarrow Lie(G\times H)$ given by $\phi(X,Y) = \widehat{X} + \widetilde{Y}$. Since $\phi$ is given by pushforwards, it is obviously linear. We claim that, in fact, $\phi$ is a Lie algebra isomorphism.
To see $\phi$ is bijective, note that since the dimension of the source and target match, we need only show that $\phi$ is injective. So, assume $(X,Y)\in Lie(G)\times Lie(H)$ and $\phi(X,Y) = 0$. If we specialize to the point $(g,h) = (e,e)$, we see that $\widehat{X}_{(e,e)} = i_\ast X_e\subseteq T_e G\times \{0\}\subseteq T_{(e,e)}(G\times H)$. (Here, I am using the fact that on any product manifold $M\times N$, we have a natural splitting $T_{(m,n)} (M\times N) \cong T_m M\oplus T_n N$, which I alluded to in a comment above.)
In the same fashion, we see that $\widetilde{Y}_{(e,e)} \in \{0\}\times T_e H\subseteq T_{(e,e)} (G\times H)$. Since $\phi(X,Y) = 0$, $\widetilde{Y} = -\widehat{X}\in T_e G\times \{0\}$. Thus, $\widetilde{Y}\in \left( T_e G\times \{0\}\right) \cap \left( \{0\}\times T_e H\right)$, so $\widetilde{Y} = 0$. Since $\widehat{X} = -\widetilde{Y}$, $\widehat{X} = 0$ as well. This shows that $\phi$ is injective, hence bijective.
Finally, we need to check that $\phi$ preserves the bracket. Because $\phi$ is given by pushforwards on each factor, it preserves the Lie bracket on pairs of the form $(X_1,0)$ and $(X_2,0)$, and it also preserves the bracket on pairs of the form $(0,Y_1)$ and $(0,Y_2)$.
By linearity, it sufficies to check that that $\phi$ preserves the Lie bracket on pairs of the form $(X,0), (0,Y)$. Of course, in the domain of $\phi$, $[(X,0), (0,Y)]=0$, so must shows that $[\widehat{X},\widetilde{Y}] = 0$. To that end, if suffices to show that the flows of $\widehat{X}$ and $\widetilde{Y}$ commute.
Fix a point $(g,h)\in G\times H$. The $\widehat{X}$ flow through $(g,h)$ is simply $\alpha(t) = (g,h)(\exp(tX), e)$ (because at time $0$, we get $(g,h)$, and the derivative at time $0$ is $(L_{(g,h)})_\ast (i_\ast X) = \widehat{X}.$)
Similarly, the $\widetilde{Y}$ flow through $(g,h)$ is $\beta(t) = (g,h)(e,\exp(tY))$. Since $(e,\exp(tY)$ and $(\exp(tX),e)$ commute (because the identity $e$ commutes with everything), the flows commute, so the Lie bracket $[\widehat{X},\widetilde{Y}] = 0$.