As Steven Gubkin and Ryan Budney have already pointed out, cohomology is often used to measure how far a "locally consistent" object is from being "globally consistent". I thought I might describe another example of this in set theory, which it turns out contains a lot of open problems. As far as I know, this example hasn't been written down anywhere, so I'll have to be a bit verbose. I won't attempt an actual answer to the OP's question, but I hope that what I write down might be helpful.
Disclaimer: Justin Moore told me about this problem many years ago, when I was just beginning grad school. What I'm writing down is what I've been able to reconstruct from my memory of that conversation; it might not be the most up-to-date information on the problem, or the best description of it.
Given a subset $A$ of $\omega$, let $\Gamma(A) = \prod_{n\in A} \mathbb{Z} / \bigoplus_{n\in A} \mathbb{Z}$. Thus, an element of $\Gamma(A)$ can be described as the equivalence class of a function $f : A\to\mathbb{Z}$, where the equivalence is "$f$ and $g$ differ on at most finitely-many coordinates."
Now given a family $\mathcal{A}\subseteq\mathcal{P}(\omega)$, and an $n < \omega$, we define the groups $$ C_n(\mathcal{A}) = \prod_{A_1,\ldots,A_n} \Gamma(A_1\cap\cdots \cap A_n)$$
When $n = 0$, this definition is a little ambiguous, so we take the opportunity to identify $C_0(\mathcal{A})$ with $\Gamma(\omega)$. (One can argue that that's the correct way of doing things, but I'll leave it to the reader.) Now we can define coboundary maps $\delta_n : C_n\to C_{n+1}$ (for all $n$, including $n = 0$) by $$\delta_n(F)(A_1,\ldots,A_{n+1}) = \sum_{k=0}^n (-1)^k F(A_1,\ldots,\widehat{A_{k+1}},\ldots,A_{n+1})$$ where as usual $\widehat{A_{k+1}}$ means we drop $A_{k+1}$ from the list. One can prove as usual that $\delta_{n+1}\circ \delta_n = 0$, so $H_n(\mathcal{A}) = \ker{\delta_{n+1}} / \textrm{im}\;\delta_n$ makes sense.
If you work through the definitions, you can see that $\delta_0$ maps a function (or more accurately, its equivalence class) to its restrictions to elements of $\mathcal{A}$. $\delta_1$ takes a collection of functions defined on members of $\mathcal{A}$ to their differences (on the pairwise intersections).
Hence, a member of $\ker{\delta_1}$ is a family of functions $f_A : A\to \mathbb{Z}$ ($A\in\mathcal{A}$) such that $f_A\upharpoonright A\cap B$ and $f_B\upharpoonright A\cap B$ agree mod-finite for every $A,B$. Such families have been studied before by set theorists, and are called coherent families. The question of whether such a coherent family is in $\textrm{im}\;\delta_0$ is exactly what comes up in Dow, Simon and Vaughan's paper "Strong homology and the proper forcing axiom". They prove there the following (I'm paraphrasing a little bit):
Theorem 1: Assume $\mathfrak{d} = \omega_1$. Then there is a $P$-ideal $\mathcal{I}\subseteq\omega$ (in fact, $\mathcal{I}$ is just $\emptyset\times\textrm{fin}$) such that $H_0(\mathcal{I}) \neq 0$.
Theorem 2: Assume the Proper Forcing Axiom. Then $H_0(\mathcal{I}) = 0$ for every $P_{\aleph_1}$-ideal $\mathcal{I}$.
Actually, it's not hard to prove that $2^\omega < 2^{\omega_1}$ implies that $H_0(\mathcal{A})$ has size $2^{\omega_1}$, whenever $\mathcal{A}$ is a $\subset^*$-increasing $\omega_1$-sequence in $\mathcal{P}(\omega)$. Moreover, Velickovic proves Theorem 2 from just OCA in his paper "OCA and automorphisms of $\mathcal{P}(\omega)/\mathrm{fin}$".
Okay, so we have a lot of natural questions!
Question: What is the possible behavior of $H_n(\mathcal{A})$ for various sets $\mathcal{A}$, and $n\ge 1$? Does PFA (or MM, or whatever) imply that they're all trivial, whenever (say) $\mathcal{A}$ is a $P$-ideal? Can we consistently get $H_n(\mathcal{A}) \neq 0$ for all $n\ge 1$? All at the same time? Etc.
Here's another, entirely unrelated problem. It's known that for every $n$, there is a $\sigma$-$n$-linked poset of size $\mathfrak{b}$, which has no $n+1$-linked subset of size $\mathfrak{b}$. (See Todorcevic, "Remarks on cellularity in products.") Can you express this using cohomology (or maybe homology)?