Lie groups where $x \mapsto x^2$ is a diffeomorphism? In every Lie group $G$ the function $x \mapsto x^2$ is a local diffeomorphism in a neighbourhood of the identiy.
(This is because its differential is: $v \mapsto 2v$ when considered as a map from $T_eG$ to itself).
In some Lie groups it is a global diffeomorphism, for instance in $\mathbb{R}^n$.
I would like to find more examples for Lie groups where the square is a global diffeomorphism. Are there any non-abelian groups where this holds?

Suppose so. I'm going to call the inverse $s$ for square root.
The exponential map of such a Lie group is automatically injective. For if $e(a)=e(b)$, then $s^k(e(a))=s^k(e(b))$; because we know square roots are unique in $G$, we know that $s^k(e(a)) = e(a/2^k)$. For large enough $k$, because the exponential map is a diffeomorphism near zero, we duduce $a/2^k=b/2^k$, hence $a=b$.
Now we may invoke the Dixmier-Saito classification of Lie groups with injective exponential to verify that the exponential is actually a diffeomorphism. Then define $s(g) = e(e^{-1}(g)/2)$. Because $e$ is a diffeomorphism, this is a well-defined smooth map, which you may check is the inverse of the squaring map. 
Hence $x \mapsto x^2$ is equivalent to the exponential map being injective, which is equivalent to all the properties in the linked classification; in particular


  
*$G$ is solvable, simply connected, and $\mathfrak{g}$ does not admit $\mathfrak{e}$ as subalgebra of a quotient.
  
*$G$ is solvable, simply connected, and $\mathfrak{g}$ does not admit $\mathfrak{e}$ or $\tilde{\mathfrak{e}}$ as subalgebra
  
  
  Here $\mathfrak{e}$ is the 3-dimensional Lie algebra with basis $(H,X,Y)$ and bracket $[H,X]=Y$, $[H,Y]=-X$, $[X,Y]=0$. It is isomorphic to the Lie algebra of the group of isometries of the plane. Its central extension $\tilde{\mathfrak{e}}$ is defined as the 4-dimensional Lie algebra defined by adding a central generator $Z$ and the additional nonzero bracket $[X,Y]=Z$.

One particular nontrivial example is the Heisenberg group. Note that this does not include all simply connected nilpotent Lie groups, because $\mathfrak e$ itself is nilpotent! So the universal cover of the group of oriented affine transformations of the plane is nilpotent but $x \mapsto x^2$ is not a diffeomorphism.
