One can show the following:
Let $G$ be a connected Lie group. Then $Z(\operatorname{Lie}G) = \operatorname{Lie}Z(G)$.
Here, $\operatorname{Lie}$ denotes the functor from Lie groups to Lie algebras, i.e. $\operatorname{Lie}G$ is the Lie algebra of $G$.
There is a nice corollary:
Let $G$ be a connected Lie group. Then $G$ is Abelian if and only if $\operatorname{Lie}G$ is.
To prove the statement, we'll need the following lemma:
Let $G$ be a connected Lie group. Then $Z(G) = \operatorname{ker}(Ad:G \rightarrow GL(\operatorname{Lie}G))$
Proof of the lemma:
"$\subset$": This follows immediately from the fact that conjugation by an element that lies in the center is the identity on $G$, in particular its differential is just $\operatorname{id}_{\operatorname{Lie}G}$.
"$\supset$": Let $g$ be in the kernel, i.e. $(\alpha_g)_* \equiv \operatorname{Ad}(g) = \operatorname{id}_{\operatorname{Lie}G}$, where $\alpha_g$ denotes conjugation by g. But the functor Lie is faithful on the subcategory of connected Lie groups (*), so since $(\alpha_g)_* = \operatorname{id}_{\operatorname{Lie}G} = (\operatorname{id}_G)_*$, it follows $\alpha_g = \operatorname{id}_G$, thus $g \in Z(G)$.
This proves the lemma. In particular, since the kernel is a Lie subgroup of $G$, this shows that $Z(G)$ is a Lie subgroup, as well, and thus a Lie group, so the notion of $\operatorname{Lie}Z(G)$ in the original claim is in fact well-defined.
Proof of the original claim:
Since $Z(G)$ is a Lie subgroup of $G$, we can consider $\operatorname{Lie}Z(G) \subset \operatorname{Lie}G$ to be a subalgebra in the canonical way and $\exp_{Z(G)} \equiv \exp_G|_{Z(G)}$ (which we'll just denote by $\exp$ in the following).
"$\subset$": Let $X \in Z(\operatorname{Lie}G)$, i.e. $\operatorname{ad}X = 0$. If we find a curve $\gamma$ in $Z(G)$ whose derivative is $X$ we're done. The somewhat obvious idea is $\gamma(t) := \exp(tX)$ which has derivative $X$. So it remains to show that indeed $\gamma(t) \in Z(G)$. But $\operatorname{Ad}(\gamma(t)) = \operatorname{Ad}(\exp(tX)) = \exp_{GL(\operatorname{Lie}G)}(\operatorname{ad}(tX))$ by a commutative diagram which, in turn, equals $\exp_{GL(\operatorname{Lie}G)}(0) = \operatorname{id}_{GL(\operatorname{Lie}G)}$ and the claim follows by the lemma.
"$\supset$": Let $X \in \operatorname{Lie}Z(G)$, in particular $\exp(tX) \in Z(G)\; \forall t$. We have to show that $\operatorname{ad}X = 0$. Now, using commutative diagrams one can show in a straightforward way that $\forall x, y \in \operatorname{Lie}G$:
$$ \exp x · \exp y · (\exp x)^{-1} = \exp(e^{\operatorname{ad}x}(y))$$
Here, $e \equiv \exp_{GL(\operatorname{Lie}G)}$ is the matrix exponential. We apply this identity in the following way: Let $Y \in \operatorname{Lie}G$ and let $U$ be a neighborhood of $0 \in \operatorname{Lie}G$ s.t. $\exp|U: U \rightarrow \exp U$ is a diffeomorphism. Pick $s, t \in \mathbb{K}, s,t \neq 0$ small enough s.t. $sX, tY, e^{\operatorname{ad}(sX)}(tY) \in U$. Then plugging in $x := sX, y := tY$ above and using $\exp(sX) \in Z(G)$ results in:
$$ \exp(tY) = \exp(e^{\operatorname{ad}(sX)}(tY))\,, $$
so by injectivity of $\exp$ on $U$ (cancel $t$ using linearity):
$$ Y = e^{\operatorname{ad}(sX)}(Y)$$
Since $Y$ was arbitrary, this implies $e^{\operatorname{ad}(sX)} = \operatorname{id}_{\operatorname{Lie}G}$ for all $s$ small enough. By choosing $s$ even smaller (if necessary), we achieve that $\operatorname{ad}(sX)$ is in a neighborhood of $0 \in \operatorname{gl}(\operatorname{Lie}G)$ where $e$ is injective as well and we obtain $\operatorname{ad}(sX) = 0$, implying the claim.
Proof of the corollary:
Let $G$ be Abelian. Then $Z(G) = G$, so by the above we have $Z(\operatorname{Lie}G) = \operatorname{Lie}G$, proving that $\operatorname{Lie}G$ is Abelian.
Let $\operatorname{Lie}G$ be Abelian, i.e. $\operatorname{Ad}_* = \operatorname{ad}: \operatorname{Lie}G \rightarrow \operatorname{gl}(\operatorname{Lie}G)$ is the zero map. But the map $G \rightarrow \operatorname{GL}(\operatorname{Lie}G), g \mapsto \operatorname{id}_{\operatorname{Lie}G}$ has differential $0$ as well, so once again by the faithfulness of the functor Lie we have: $\operatorname{Ad}(g) = \operatorname{id}_{\operatorname{Lie}G}$, i.e. $g \in Z(G)$, so $G$ is Abelian.
(*) The functor Lie is faithful on the category of connected Lie groups:
Let $G, H$ be two Lie groups, $G$ connected, and $f_{1,2}: G \rightarrow H$ two morphisms with $f_{1*} = f_{2*}$. Then $f_1 = f_2$.
Sketch of proof:
- Pick an open neighborhood $U$ of $0 \in \operatorname{Lie}G$ s.t. the exponential map maps $U$ diffeomorphically to an open neighborhood $V := \exp{U} \subset G$ of $e \in G$.
- Show that $f_1|_V = f_2|V$. (Use the standard commutative diagram involving $\exp_G, \exp_H$, $f_{1,2}$ and $f_{1,2*}$.)
- Since $G$ is connected, it is generated by the elements in $V$, i.e. $G = \{g_1 · … g_n | n \in \mathbb{N}, g_1, …, g_n \in V \cap V^{-1}\}$. To see this, show that the right-hand side is an open subgroup of $G$, thus a closed subgroup, so it equals $G$ by connectedness.
- Use 3) to extend the statement $f_1|_V = f_2|V$ from 2) to all of $G$.
The main result you need is:
Suppose $G$ and $H$ are Lie groups with Lie algebras $\mathfrak{g}$ and $\mathfrak{h}$ and that $G$ is simply connected. Let $f:\mathfrak{g}\rightarrow \mathfrak{h}$ be a Lie algebra homomorphism. Then, there is a unique $F:G\rightarrow H$ for which $d_e F = f$.
Believing this for a second, note that $G'\times G''$ is a simply connected Lie group as is $G$. Applying the above to the identity map between the two Lie algebras, we get a map $F_1:G\rightarrow G'\times G''$ as well as a map $F_2:G'\times G''\rightarrow G$.
The composition $F_2\circ F_1: G\rightarrow G$ satisfies $d_e(F_2\circ F_2) = Id$, but so does $Id:G\rightarrow G$. By uniqueness above, this implies $F_2\circ F_1 = Id$. Similarly, $F_1\circ F_2$ is the identity, so they are both Lie group isomorphisms.
The following proof of the highlighted fact can be found in Wolfgang Ziller's notes Proposition 1.20.
Given $f:\mathfrak{g}\rightarrow \mathfrak{h}$, consider the graph $\mathfrak{k}=\{(x,f(x))\in \mathfrak{g}\oplus\mathfrak{h}: x\in\mathfrak{g}\}$. Since $f$ is a homomorphism, the graph is a subalgebra. Hence, there is a unique connected subgroup $K$ of $G\times H$ with Lie algebra $\mathfrak{k}$. The projection $\pi_1:G\times H\rightarrow G$, when restricted to $K$ is a covering because $d\pi_1$, when restricted to $\mathfrak{k}$ is the identity. Since $G$ is simply connected, $\pi_1|_{K}$ is an isomorphism between $K$ and $G$. Then the map $\pi_2\circ(\pi_1|_{K})^{-1}: G\rightarrow H$ induces $f$.
Best Answer
This is an answer for $G$ connected.
Okay, for $Y\in \frak{g}$, you can show that the flow on $G$ given by the vector field, $Y$, is given by multiplication by elements of $e^{tY}, (t\in \mathbb{R})$. If $X\neq 0$, is in the center, then its flow commutes with the flow associated to all other members of $\frak{g}$ i.e. $e^{tX}$ commutes with $e^{tY}$ for all $Y\in \frak{g}$. The set $\{e^{tY}: t\in \mathbb{R}, Y\in \frak{g}\}$ contains an open neighborhood of the identity, so it generates $G$, since $G$ is connected. So $e^{tY}$ commutes with a subset that generates $G$, hence it commutes with all elements of $G$. Hence $e^{tY}$ is in the center of $G$. So $Z(G)$ contains a one-dimensional sub manifold, hence is not zero-dimensional.
I realize this probably uses more Lie-group theory than you had hoped, and maybe theres a more elementary way to do it, but i don't immediately see it.
Edit :Maybe there's an easier way to see that $X\in Z(\frak{g})$ implies $e^{tX}\in Z(G)$: Let $\gamma: \mathbb{R}\rightarrow \mathfrak{g}, t\mapsto L_{e^{tY}\ast} \circ R_{e^{-tY}\ast }(X_e)$. Then prove that $\gamma'(0)=[X,Y]$ (this requires the interpretation of the bracket as the Lie derivative). So if $X$ is in the center, then $\gamma'(s)= L_{e^{sY}_\ast }\circ R_{e^{-sY}_\ast }(0)=0$ (since $ L_{e^{(s+t)Y}\ast}= L_{e^{sY} \ast} \circ L_{e^{tY} \ast}$ and likewise for $X$). But this implies $\gamma = X_e$ is constant. So $e^{tY}e^{uX}e^{-tY} = e^{uX}$ for all $t, u\in \mathbb{R}$, which says all $e^{uX}$ commute with all $e^{tY}$