When does a line bundle have a meromorphic section? Let $X$ be a scheme and $D$ be a Cartier divisor on $X$. Then $D$ determines a line bundle $\mathcal{O}(D)$ on $X$. Under which condition, is the converse true? That is, when does a line bundle come from a Cartier divisor. This is equivalen to saying when does a line bundle have a meromorphic section? 
I know that when $X$ is a non-projective manifold line bundles do not have sections in general. 
 A: The map you describe $Cacl(X)\to Pic(X)$ sending the linear equivalence class $[D]$ of a Cartier divisor $D$ to the line bundle $\mathcal O(D)$ is always injective.
It is very often surjective: it is the case if $X$ is integral or if $X$ is projective over a field.
However Kleiman has given a complicated example of a complete non-projective 3-dimensional irreducible scheme on which there is a line bundle not having any non-zero rational section and thus not coming from a Cartier divisor.
The scheme $X$ is obtained from Hironaka's complete,  integral, non-singular, non projective variety of dimension 3 (which is already a strange beast!) by adding nilpotents to the local ring of just one point.
The details can be found in Hartshorne's Ample Subvarieties of Algebraic Varieties , Chapter I, Example 1.3, page 9.  
Here is a picture (in blue) of Hironaka's strange beast . The description is on page 185 of Shafarevich's book. 
A: The most general assertion I know is: 
Any invertible sheaf on $X$ is isomorphic to a $O_X(D)$ when $X$ is locally noetherian and if the associated points of $X$ are contained in an affine open subset of $X$ (EGA IV.21.3.4). 
The condition on the associated points is satisfied if for instance $X$ is quasi-projective over a noetherian ring (then any finite subset of $X$ is contained in an affine open subset), or if $X$ is noetherian and reduced.
