Let $L$ be a line bundle over a compex manifold $X$, a squareroot of $L$ is a line bundle $M$ such that $M^{\otimes2}=L$. My question is when the squareroot of Line Bundle is unique?

Let's start with a counterexample. Take a one dimensional complex torus $X=\mathbb C/\mathbb Z\oplus \mathbb Z\tau$. Take a point which is a $2$torsion in the group structure coming from $\mathbb C$, for instance the point $(\frac 12, \frac 12 \tau)$. The line bundle that corresponds to this point (if you don't know what that is, just take its ideal sheaf in the structure sheaf) will be a "squareroot" of the trivial bundle. In general, there are plenty torsion bundles, that is, line bundles with a finite power which is trivial. There are two ways you can get those. (For simplicity) let $X$ be a smooth projective manifold over $\mathbb C$. Consider the exponential sequence $$ 0 \to \mathbb Z_X \to \mathscr O_X \to \mathscr O_X^\times \to 0$$ and the long exact cohomology sequence it leads to: $$ 0 \to \mathbb Z \to \mathbb C \to \mathbb C^\times \overset 0 \longrightarrow H^1(X,\mathbb Z)\to H^1(X,\mathscr O_X)\to H^1(X,\mathscr O_X^\times)\overset{c_1}{\longrightarrow} H^2(X,\mathbb Z)$$ Now here one has that $H^1(X,\mathbb Z)\simeq \mathbb Z^{2g}$, $H^1(X,\mathscr O_X)\simeq \mathbb C^{g}$, and $H^1(X,\mathscr O_X^\times)\simeq \mathrm{Pic}(X)$ and the last map $H^1(X,\mathscr O_X^\times)\to H^2(X,\mathbb Z)$ is just $c_1$ as in Henry's answer. The image of $H^1(X,\mathscr O_X)$ in $H^1(X,\mathscr O_X^\times)$ is usually denoted by $\mathrm{Pic}^\circ(X)$ and is isomorphic to $\mathbb C^g/\mathbb Z^{2g}$, a complex torus (actually if $X$ is projective, then this is an abelian variety, called the Picard variety). The line bundles parametrized by this are the topologically trivial line bundles, that is those whose $c_1$ is zero. This being a complex torus there will be plenty of elements that are of finite order and they all correspond to torsion line bundles. In particular, if $g\neq 0$ then there will always be nontrivial line bundles whose square is trivial. To see how these appear geometrically, consider the Albanese morphism which maps $X$ to the abelian variety $\mathrm{Alb}(X)=H^0(X,\Omega_X)/H_1(X,\mathbb Z)^*$ (called the Albanese variety of $X$) which is just the dual abelian variety of the Picard variety. Take a torsion line bundle there and pull it back to $X$. The other way you can get a nontrivial $2$torsion line bundle is if there is a $\mathbb Z_2$ sitting in $\mathrm{Pic}(X)/\mathrm{Pic}^\circ (X)$, the image of $c_1$. According to Andy's comment below, any torsion in $H^2(X,\mathbb Z)$ is in the image of $c_1$, so one does not need to worry about the containment. This is what happens in the case of Enriques surfaces as pointed out by Lev. For an Enriques surface $g=0$, $c_1$ is an isomorphism and $\mathrm{Pic}(X)\simeq \mathbb Z^{10}\oplus \mathbb Z_2$. The $2$torsion line bundle is the canonical line bundle, the determinant of the (co)tangent bundle. 


Complex line bundles over a manifold are classified by their first Chern class; we have a bijection $$\{\text{isomorphism classes of complex line bundles on $X$}\} \leftrightarrow H^2(X; \Bbb Z),$$ $$L \mapsto c_1(L).$$ The first Chern class is additive with respect to tensor products, so we see that $$c_1(L^{\otimes 2}) = 2c_1(L). \tag{$\ast$}$$ Now if $K$ is a complex line bundle with $K^{\otimes 2}$ trivial, then $$c_1((L \otimes K)^{\otimes 2}) = c_1(L^{\otimes 2}) + c_1(K^{\otimes 2}) = c_1(L^{\otimes 2}),$$ so $(L \otimes K)^{\otimes 2} \cong L^{\otimes 2}$ and therefore $L \otimes K$ is also a square root of $L^{\otimes 2}$. In general, from $(\ast)$ we see that square roots of the trivial line bundle will correspond to $2$torsion elements in $H^2(X; \Bbb Z)$. Hence square roots of line bundles are unique when $H^2(X; \Bbb Z)$ has no $2$torsion. 

