Proof (left and right cosets equal iff normal subgroup)

Forward direction: suppose $H\lhd G$. This means that for all $h\in H, g\in H$, there exists $h'\in H$ such that $$ h' = ghg\inv. $$ Then $$ gh = h'g \in Hg $$ so $gH \subseteq Hg$. Also $$ Hg = (g\inv H)\inv \subseteq (Hg\inv)\inv = gH $$ so $Hg = gH$ as required.

Backward direction: suppose $gH = Hg$ for all $g\in G$. This means that for all $h\in H$, there exists $h'\in H$ such that $$\begin{align*} gh &= h'g \\ ghg\inv &= h' \in H \end{align*}$$ as required to show $H\lhd G$.