In John Lee's book Introduction to Smooth Manifolds, there is the following Theorem.
Theorem 7.35 (Characterization of Semidirect Products). Suppose $G$ is a Lie group, and $N,H\subseteq G$ are closed Lie subgroups such that $N$ is normal, $N\cap H=\{e\}$, and $NH=G$. Then the map $(n,h)\mapsto nh$ is a Lie group isomorphism between $N\rtimes_\theta H$ and $G$, where $\theta:H\times N\to N$ is the action by conjugation: $\theta_h(n)=hnh^{-1}$.
The proof is left as an exercise so I cannot verify if I am correct, but I believe that it is unnecessary to assume that $H$ is a closed Lie subgroup. It appears that we only need $H$ to be an immersed Lie subgroup of $G$ (but $N$ still needs to be closed). Am I correct?
Here is my proof without assuming that $H$ is closed:
Proof. We first show that $\theta$ is smooth. Since $N$ is normal, we have $\theta_h(H\times N)\subseteq N$. Moreover, $N$ is an embedded submanifold of $G$ since it is closed (Theorem 7.21), and $H\times N$ is an immersed submanifold of $G\times G$, so the conjugation map $C:G\times G\to G$, $C(a,b)=aba^{-1}$ restricts to a smooth map $\theta:H\times N\to N$ (Corollaries 5.27 and 5.30). Moreover, for each $h\in H$, $\theta_h:N\to N$ is a Lie group isomorphism, so $\theta$ is an action by automorphisms and hence defines a semi-direct product $N\rtimes_\theta H$. Now, the map $$F:N\rtimes_\theta H\to G,\quad F(n,h)=nh$$ is smooth since it is the restriction of the multiplication map $m:G\times G\to G$ to the immersed submanifold $N\times H$ of $G\times G$. Moreover, $F$ is a Lie group homomorphism since $$F((n,h)(n',h'))=F(nhn'h^{-1},hh')=nhn'h^{-1}hh'=nhn'h'=F(n,h)F(n',h').$$ Therefore, $F$ has constant rank (Theorem 7.5) so, by the Global Rank Theorem, to show that it is a diffeomorphism it suffices to show that it is bijective. But if $F(n,h)=nh=e$ then, $h^{-1}nh=h^{-1}\in N\cap H=\{e\}$, so $h=e$ and $n=e$. Thus, $F$ is injective, and also surjective since $NH=G$. $\tag{Q.E.D.}$
You're right, but note that $H$ is automatically closed since it's the preimage of $\{1\}\times H$ under the diffeomorphism $G\to N\times H$, so there's no harm in adding this hypothesis.