The necessary and sufficient condition for $\textbf{global}$ conformal flatness of a n-dim (pseudo-)Riemannian manifold There is a theorem :
1) 2-dim (pseudo-)Riemannian manifold must be local conformal flat;
2) 3-dim (pseudo-)Riemannian manifold is local conformal flat iff the Cotton tensor vanishes.
3) n-dim (n>3) (pseudo-)Riemannian manifold is local conformal flat iff the Weyl tensor vanished.
Then I'm curious about the necessary and sufficient condition for  $\textbf{global}$ conformal flatness of a n-dim (pseudo-)Riemannian manifold $(M,g)$, i.e. there exist a function $\Omega(x)$ defined in the whole manifold such that $g=\Omega^2 \eta$, where $\eta$ is the flat metric.
Are there some literature or textbooks covering this question? Thanks!
 A: The questions you are asking have been carefully studied in the literature, but, usually, with carefully chosen global hypotheses so that reasonable results can be achieved.  You should look at the works of William Goldman, Mischa Gromov, and Scott Adams, just to name a few, as well as more recent authors studying parabolic geometries (e.g. Andreas Cap, Jan Slovak, Mike Eastwood, etc.) for more information about this.  Here, I'll just make a few remarks.
The cases $n\ge 3$ are very different from the $n=2$ case and so have to be treated differently.  
In general, when $n\ge 3$, and one is looking at pseudo-Riemannian metrics of type $(p,q)$ (where $q = n{-}p$), there is the 'standard conformally flat model' $Q_{p,q}=G_{p,q}/P_{p,q}$, where $G_{p,q} = \mathrm{O}(p{+}1,q{+}1)$, and $P_{p,q}$ is a maximal parabolic in $G_{p,q}$.    
When $\bigl(M^n,[g]\bigr)$ is conformally flat, Cartan showed that one can canonically construct a $P_{p,q}$-bundle $B_{p,q}\to M$ with a flat Cartan connection $\phi$.  If $M$ is connected and $\tilde M\to M$ is the universal cover, then there is a mapping $g:\tilde B_{p,q}\to G_{p,q}$ unique up to left translation, that pulls back the canonical left-invariant form on $G_{p,q}$ to be $\phi$.  This mapping is equivariant with respect to the natural right actions of $P_{p,q}$ on $\tilde B_{p,q}$ and $G_{p,q}$.  This induces a monodromy homomorphism $\mu:\pi_1(M)\to G_{p,q}$ that is well-defined up to conjugation in $G_{p,q}$.  Then the existence of a flat metric in the conformal class is equivalent to having the image of this monodromy homomorphism be conjugate to a subgroup of $H_{p,q}\subset G_{p,q}$, the subgroup that fixes a metric on an open subset of $Q_{p,q}$ that contains the induced image of $\tilde M$ in $Q_{p,q}$.  (This almost never happens without special hypotheses on $\pi_1(M)$ or curvature restrictions on some metric on the conformal class, etc.)  In any case, the methods involved are ODE methods and information about the geometry of discrete subgroups of the conformal group. 
When $n=2$, you are asking about a global PDE problem.  Of course, there are answers in simple cases, such as when $M$ is compact, or complete with positive curvature, or some such.  For example, if you assume that the metric is positive definite and that the conformal type is parabolic, then, yes, there is such a flat metric in the class, but this is a very restrictive assumption.  Generally, conformal structures (even in the definite case) can be very complicated (even when the topology is 'finite'), and there will be no simple universal criterion for the existence of a flat metric in the given conformal class.  
A: I  add a small $\varepsilon$ to Robert's answer, which is a simple explanation and a simple example to 
what he said concerning the 2 dim case. Conformal structure of signature (1,1)  on the 
surface is essentially the same as a pair of everywhere transversal
foliations. Well, up to a double cover, to be precise. 
Indeed, for a  metric, the lightline cone at every point is two straight lines in  the tangent space intersecting at the origin. The foliations are given by condition that they are tangent to these straight lines. 
It is known (see for example sect.  5.1 of http://lanl.arxiv.org/abs/1002.3934)  that for globally flat metrics these   foliations  are somehow standard: moreover, 
any  flat torus is a  quotient of $(R^2, g=dxdy)$ by a lattice. It is also easy to construct foliations that are not ``standard'', say we easily construct a foliation such that it has a Reeb component.  The conformal structure  corresponding to this foliation is conformally flat, since in dimension 2 any metric is conformally flat, but is not globally conformally flat   
