[EDIT: A previous version mistakenly argued that the fundamental group of X was responsible for torsion in the Picard group. I hope that this is correct now! Btw, there is probably a more direct way of arguing, but I cannot find one at the moment.]
The Picard group of X is torsion free if and only if the group ${\rm H_1}(X,\mathbf{Z})$ vanishes.
By the exponential sequence, the torsion in the Picard group of X comes from the torsion in ${\rm H^2}(X,\mathbf{Z})$ and from ${\rm H^1}(X,\mathbf{C})/{\rm H^1}(X,\mathbf{Z})$. Thus the vanishing of ${\rm H_1}(X,\mathbf{Z})$ is equivalent (by the Universal Coefficient Theorem) to the torsion-freeness of the Picard group of X.
ADDED (for explicitness) To make everything more explicit, assume that X is non-singular. The Picard group of X may contain torsion coming from two different sources. There might contain torsion in the connected component of the identity, and this is recorded by the torsion free part of the first homology group. Or there might be torsion in the component group of the Picard group, and this is recorded by the torsion in the first homology group. In terms of the exponential sequence, the first kind of torsion appears in the image of ${\rm H^1}(X,\mathbf{C})$, while the second one "appears" in torsion in ${\rm H^2}(X,\mathbf{Z})$. The Universal Coefficient Theorem implies that the "combination" of these two groups is the whole first integral homology group.
An example of torsion of the first kind is already present in the case of curves of genus at least one: the Jacobian of the curve contains plenty of torsion bundles. An example of torsion of the second kind is the case of Enriques surfaces: the canonical divisor on such a surface is a torsion line bundle that is non-trivial. If the characteristic of the ground-field is different from two, the corresponding cover of X is a K3 surface.