Mathematically mature way to think about Mayer–Vietoris This question is short but to the point: what is the "right" abstract framework where Mayer-Vietoris is just a trivial consequence?
 A: The Mayer-Vietoris sequence is an upshot of the relationship between sheaf cohomology and presheaf cohomology (a.k.a. Cech cohomology).
Let $X$ be a topological space (or any topos), $\mathcal U$ a covering of $X$. Let $\mathop{\rm Sh}X$ be the category of sheaves on $X$ and $\mathop{\rm PreSh}X$ the category of presheaves. The embedding $\mathop{\rm Sh}X \subseteq \mathop{\rm PreSh}X$ is left-exact; its derived functors send a sheaf $F$ into the presheaves $U \mapsto \mathrm H^i(U, F)$. For any presheaf $P$, one can define Cech cohomology $\mathrm {\check H}^i(\mathcal U, P)$ of $P$ by the usual formulas (this is often done only for sheaves, but scrutinizing the definition, one sees that the sheaf condition is never used). One shows that the $\mathrm {\check H}^i(\mathcal U, -)$ are the derived funtors of $\mathrm {\check H}^0(\mathcal U, -)$; and of course for a sheaf $F$, $\mathrm {\check H}^0(\mathcal U, F)$ coincides with $\mathrm H^0(\mathcal U, F)$. The Grothendieck spectral sequence of this composition, in the case of a covering with two elements, gives the Mayer--Vietoris sequence.
There is also a spectral sequence for finite closed covers, which is obtained as in anonymous's answer.
I guess that this can also be interpreted as Tilman does, in a different language (I am not a topologist).
A: Maybe you're looking for the Mayer-Vietoris spectral sequence, the homology spectral sequence for a homotopy colimit? The MV-sequence is a two-line spectral sequence, thus an exact sequence.
The general form is
$$
E^2_{p,q} = colim_p H_q(X_\bullet) \Rightarrow H_{p+q}(hocolim X_\bullet)
$$
You can think of this as a composite functor spectral sequence.
A: This answer is related to Tilman's: Let $U$ and $V$ be the open sets covering $X$. For $S$ an open subset of $X$, let $\mathbb{Z}_S$ be the pushforward to $X$ of the sheaf of locally constant integer valued functions on $S$. Then we have a short exact sequence of sheaves
$$0 \to \mathbb{Z}_X \to \mathbb{Z}_U \oplus \mathbb{Z}_V \to \mathbb{Z}_{U \cap V} \to 0$$
and the corresponding long exact sequence is the Mayer-Vietores sequence in cohomology.

This answer can be generalized easily to any open cover of $X$: you have a long exact sequence of sheaves:
$$0 \to \mathbb{Z}_X \to \bigoplus \mathbb{Z}_{U_i} \to \bigoplus \mathbb{Z}_{U_i \cap U_j} \to \cdots$$
which gives a spectral sequence 
$$\bigoplus H^p(U_{i_1} \cap U_{i_2} \cap \cdots U_{i_q}) \to H^{p+q}(X).$$
A: Here's an answer somewhat different from those already given. 
Associated to any homotopy pullback square, there's a long exact sequence of homotopy groups often called the Mayer-Vietoris sequence.  It comes from weaving together the long exact sequences for, say, the two vertical maps in the square, which have homotopy equivalent homotopy fibers.  (This weaving is a standard homological algebra exercise, and appears somewhere in Hatcher's book...)
Now, to build the Mayer-Vietoris sequence in cohomology for a CW complex X written as a union of subcomplexes $X = A\cup B$, just note that the homotopy pushout square formed by $A\cap B$, A, B, and X becomes a homotopy pullback square after applying Map(-, K(G, n)), where G is the coefficient group you're using. The Mayer-Vietoris homotopy sequence is now precisely the M-V sequence in cohomology.
(Annoyingly, for a fixed value of n this only gives you some of the sequence.)
It would be interesting to see a variant of this for homology, maybe using the infinite symmetric product?  I suppose the place to look would be the book by Aguilar-Gitler-Prieto, where homology is introduced entirely in terms of symmetric products.  The relevant bit seems to be missing from the Google preview.
A: There is a Mayer Vietoris sequence for any sheaf theory (and so for $\ell$ adic cohomology, de Rham cohomology, singular cohomology, $p$ adic,... ).
If $i:Z\hookrightarrow X$ is a closed embedding and $j:U\hookrightarrow X$ its complementary open embedding, there is the distinguished triangle/(co)fibre sequence of sheaves (of $\ell$ adic, holonomic $\mathcal{D}$ modules, constructible sheaves,... )
$$i_*i^!k_X \ \to \ k_X \ \to \ j_*j^!k_X \ \stackrel{+1}{\to}$$
Taking its long exact sequence on cohomology (=pushing forward to a point) gives the Mayer Vietoris sequence, at least something probably quasiisomorphic to it (for the open cover given by $U$ and a tubular neighbourhood of $Z$).
