What is the obstruction for a local set of models of a curve to come from a global model? If $X_{\mathbb{Q}}$ is a curve over $\mathbb{Q}$, we get a curve $X_{\mathbb{Q}_p}$ over $\mathbb{Q}_p$ for every prime $p$.
My question is about the reverse process. Say we are given curves $X_{\mathbb{Q} _ p}$ for every $p$ such that $X_ { \bar {\mathbb{Q}} _ p} \cong X_ {\bar{ \mathbb{Q}} _ q}$ for any two primes $p$ and $q$ (where the isomorphism is as schemes; alternatively, they are isomorphic when base-changed to an algebraically closed field that contains both $\mathbb{Q}_p$ and $\mathbb{Q} _ q$). Then is there a nice way to describe the obstruction for these models to come from a global curve $X_{\mathbb{Q}}$ over $\mathbb{Q}$?
 A: Interesting question. I guess the answer will be very different depending on genus $0,1,>1$. I think I can say something about genus zero.
The condition over the algebraic closures is vacuous for genus zero. For any field $K$ of characteristic zero, a curve of genus zero is isomorphic to a conic $ax^2+by^2=z^2$. When $K=\mathbb{Q}_p$ we can associate the Hilbert symbol $(a,b)_p$ which is $1$ if the conic has a point in $K$ and $-1$ if not. What's the condition that a collection $(a,b)_p$ (I'll include $p=\infty$ as well) comes from a global conic? You need that $(a,b)_p=1$ for all but finitely many $p$ and that $\prod (a,b)_p =1$ (Hilbert reciprocity). That these conditions are necessary and sufficient are proved, e.g., in Serre's Cours d'Arithmétique.
I am worried however that the question in general may not make sense, since the isomorphisms between the algebraic closures of the various $p$-adic fields are not unique. Say, in genus one, you need to give $p$-adic $j$-invariants for each $p$ all agreeing up to these isomorphisms. Does this mean that these come from a global $j$? Then is a question of local/global Weil-Chatelet groups. I don't know what happens there.
A: You might be interested in Mazur's famous article On the passage from local to global in number theory.
Mazur conjectures that if a family of varieties $V_p$ over $\mathbf{Q}_p$ indexed by the places $p$ (including $p=\infty$) of $\mathbf{Q}$ comes from a variety $V$ over $\mathbf{Q}$, then there are only finitely many $V$ (up to $\mathbf{Q}$-isomorphism) with this property.
This is true for curves of genus $0$ (see Felipe's answer) and more generally for projective spaces or quadrics of any dimension. In these cases you have not only finiteness but uniqueness.  For twisted forms of projective spaces, there is a criterion for existence : almost all the local invariants must vanish, and their sum must vanish. 
But it is open for curves of genus $1$, although he relates this conjecture to the conjectural finiteness of the Shafarevich-Tate group of elliptic curves over $\mathbf{Q}$.  
For curves of genus $>1$, it is relatively easy to prove Mazur's conjecture (because the automorphism group in question is finite).  
Counterexamples (?) Here is one approach to constructing counterexamples (as in your question, not to Mazur's conjecture!) in every genus $g>0$.  
Start with a curve $C$ over $\mathbf{Q}$ of genus $g$, and take $X_p$ to be $C_p=C\times_{\mathbf{Q}}\mathbf{Q}_p$ for every odd $p$ (and $p=\infty$, if you wish), but take $X_2$ to be a twist of $C_2$ (in the sense that they become isomorphic over an algebraic closure of $\mathbf{Q}_2$) but such that the jacobian $\mathrm{Jac}(X_2)$ of $X_2$ is not isogenous to $\mathrm{Jac}(C_2)$; presumably this can be arranged.  If so, the family $(X_p)_p$ cannot come from a curve $X$ over $\mathbf{Q}$ : for any such $X$, $\mathrm{Jac}(X)$ will have to be isogenous to $\mathrm{Jac}(C)$, whereas they are not isogenous at the place $2$ by construction.
A: I agree with the previous opinions that this should fail for $g>0$. Here's an example.
Let $C$ be a universal (hyper)elliptic curve $y^2=\prod_i (x-t_i)$.
This is clearly defined over $K=\mathbb{Q}(t_1,\ldots)$, but it
wouldn't be defined over $\mathbb{Q}$. (Suppose it were, then by specialization any
(hyper)elliptic curve would be.)
After choosing embeddings $K\subset \mathbb{ Q}_p$ for each $p$,
we get a compatible family of $p$-adic curves which don't descend to the rationals. 
A: I think the following interpretation of your question is false for cardinality reasons.  It occurred to me before I saw Donu's answer but seems to have a similar flavour. 
I will say that two curves over a field are twists of each other if they become isomorphic over an algebraic closure.
Interpretation. Fix a curve $C$ over $\mathbf{Q}$.  For every place $v$ of $\mathbf{Q}$, let $X_v$ be an arbitrary (random) twist of $C_v$.  Does there exist a curve $D$ over $\mathbf{Q}$ such that $D_v$ is isomorphic to $X_v$ for every $v$ ?
In genus $0$, not every such family can come from a conic over $\mathbf{Q}$, as Felipe has remarked.
In genus $g>0$, if we start with a hyperelliptic curve $C$, then we get uncountably many families $(X_v)_v$ by taking random quadratic twists at each place $v$.  All these families satisfy your hypotheses, and some cannot come from the countably many genus-$g$ curves over $\mathbf{Q}$. 
Examples.  Suppose we have an elliptic curve $E$ over $\mathbf{Q}$ which is the only curve in its isogeny class, and assume moreover that Ш$(E)$ is trivial.  It follow that if a genus-$1$ curve $C$ is such that its jacobian $J$ is isomorphic to $E$ almost everywhere locally, then $J$ is $\mathbf{Q}$-isogenous to $E$, and hence $\mathbf{Q}$-isomorphic to $E$, and hence $C$ is isomorphic to $E$ (because Ш$(E)$ is trivial).
Construct the family $(X_v)_v$ by taking $X_v=E_v$ for every place $v\neq2$ of $\mathbf{Q}$, and perversely take $X_2$ to be a quadratic twist of $E_2$, so that $X_2$ and $E_2$ are not $\mathbf{Q}_2$-isomorphic.
If there were a genus-$1$ curve $C$ such that $C_v$ is $\mathbf{Q}_v$-isomorphic to $X_v$ at every $v$, then $C$ would have to be $\mathbf{Q}$-isomorphic to $E$ (by the choice of $E$, as explained above), which is impossible because they are not  $\mathbf{Q}_2$-isomorphic.
It remains to find such an $E$.  I'm sure this can be done by looking at the tables made by Cremona and Stein.  Could someone please confirm this hunch ?
