There are several problems with what you write, although it can be made to work by taking a few steps "back."
First: it is not true that if you pick an arbitrary generating set for a finitely generated abelian group $G$, say $g_1,\ldots,g_n$, then you will necessarily have that $G$ is the direct sum of the cyclic groups generated by the $g_i$; even if you pick your set to be minimal. For example, in $G=\mathbb{Z}$, then $g_1=2$ and $g_2=3$ generate, no proper subset of $\{g_1,g_2\}$ generate, but $G$ is not isomorphic to $\langle g_1\rangle \oplus \langle g_2\rangle$.
It is true that one may select a suitably chosen generating set with that property, but this fact is not immediate or immediately obvious.
Second, even if you know that $G=\langle g_1\rangle\oplus \cdots \oplus \langle g_n\rangle$, it does not follow that if $H$ is a subgroup of $G$ then you can write $H=H_1\oplus \cdots \oplus H_n$ with $H_i$ a subgroup of $\langle g_i\rangle$. For example, the diagonal subgroup $H=\{(n,n)\in\mathbb{Z}\oplus\mathbb{Z}\mid n\in\mathbb{Z}\}$ of $\mathbb{Z}\oplus\mathbb{Z}$ is not equal to the direct sum of a subgroup of $\{(n,0)\mid n\in\mathbb{Z}\}$ and a subgroup of $\{(0,m)\mid m\in\mathbb{Z}\}$.
The following is true, however:
Theorem. Let $F$ be a finitely generated free abelian group. If $H$ is a subgroup of $F$, and $H\neq\{0\}$, then there exists a basis $x_1,\ldots,x_n$ of $F$, an integer $r$, $1\leq r\leq n$, and integers $d_1,\ldots,d_r$ such that $d_i\gt 0$, $d_1|\cdots|d_r$, and $d_1x_1,\ldots,d_rx_r$ is a basis for $H$.
Taking this for granted, let $G$ be a finitely generated abelian group. Let $X$ be a generating set. Then $G$ is a quotient of a free abelian group $F$ of rank $n=|X|$, $G\cong F/N$.
If $H$ is a subgroup of $G$, then $H$ corresponds to a subgroup $K$ of $F$ that contains $N$, with $H\cong K/N$. By the theorem, $K$ is generated by $r\leq n$ elements, and therefore so is $K/N$. So $H$ is finitely generated.
As for examples in the nonabelian case, I'm not sure if your idea with $D_n$ will work; notice that composing reflections can yield a rotation! For instance, in $D_4$, the relection of the square about the $x$ axis composed with the reflection about the $y$ axis results in a rotation, not a reflection. So you aren't just going to get "the reflections", you are going to get the whole of $D_{2n}$.
For an example you can get your hands on, consider the group $G$ of the $2\times 2$ invertible matrices generated by
$$ \left(\begin{array}{cc}
1 & 1\\
0 & 1
\end{array}\right) \qquad \text{and}\qquad \left(\begin{array}{cc}2 & 0\\
0&1\end{array}\right),$$
and let $H$ be the subgroup of elements of $G$ whose main diagonal entries are both equal to $1$. Verify that $H$ is a subgroup of $G$ that is \textit{not} finitely generated.
Best Answer
Determining whether two (finite) groups are isomorphic is quite difficult in general. There are lots of obstacles to isomorphism - basically, any non-silly property you can think of is preserved by isomorphisms, so any non-silly disagreement between two groups witnesses their non-isomorphicness - but it's difficult to guarantee an isomorphism without explicitly constructing one. (In particular, per the comments above neither of your conditions is sufficient to conclude that the two groups are isomorphic.)
That said, there are some tools we can use.
In the abelian case, group isomorphism is actually easy. The fundamental theorem of finite abelian groups gives a canonical way to describe any finite abelian group such that two finite abelian groups are isomorphic iff they have the same description. And the analysis required to get that description isn't very hard.
Even in the non-abelian case, we can show that a putative isomorphism between two groups $G$ and $H$ must satisfy certain constraints, and so narrow the range of possibilities we have to consider. For example, it has to send Sylow subgroups to Sylow subgroups appropriately, so breaking down the two groups via Sylow theory can make it easier to find an isomorphism if one exists (or prove that there is no isomorphism, for that matter).