Which manifolds are parallelizable?

Recall that a manifold $M$ of dimension $n$ is parallelizable if there are $n$ vector fields that form a basis of the tangent space $T_x M$ at every point $x \in M$. This is equivalent to the tangent bundle $TM$ being trivial or the frame bundle $FM$ having a global section.

I know of some conditions (both necessary and sufficient), as well as counter-examples, both of which I provided in an answer to this recent question on tangent bundles.

But the results I am familiar with are rather disparate and I was wondering whether some more coherent theory is known. In the ideal case giving a set of necessary and/or sufficient conditions (e.g. in terms of cohomology groups) or at least completely characterizing some nice class of manifolds (like for Lie groups, which are parallelizable; or for compact manifolds with non-zero Euler characteristic, which are not).

(Disclaimer. The following describes some cohomological conditions that formally answer the question. But they are 1) usually too hard to compute; 2) don’t really explain what is the class of parallelizable manifolds geometrically.)

The problem of existence of a section is answered (well, in a sense) by obstruction theory. Namely, there is the first obstruction $o_1\in H^1(X,\pi_0(F))$ and there is a section on $sk_1(X)$ iff $o_1=0$; if $o_1=0$ each section on $sk_1(X)$ defines an obstruction $o_2\in H^2(X,\pi_1(F))$ and so on (and if all obstructions are trivial, the bundle has a section).

(Well, actually one should be careful with $H^1(X;\pi_0(F))$: in general, $\pi_0(F)$ is not a group, so this $H^1$ just doesn’t make sense, and the story starts a step (or two, if $\pi_1(F)$ is not abelian) later. But in the cases we’re interested in, $o_1$ is well-defined.)

In the case of frame bundle of $n$-dimensional vector bundle, the fiber is $O(n)$, so obstructions lie in groups $H^i(M,\pi_{i-1}O(n))$. In the stable range homotopy groups of orthogonal groups are given by Bott periodicity. If we’re talking about tangent bundle, we care only about $\pi_{i-1}(O(n))$ for $i\leq n$ and for $i<n$ these groups lie in the stable range.

A (toy) example: for $S^3$ only nontrivial (reduced) cohomology group is $H^3(S^3)$; but $\pi_2 O(n)=0$ — so any vector bundle on $S^3$ is trivial (well, not the simplest proof of the fact, but still).

In case of vector bundles these obstructions can be also described more geometrically (in the spirit of characteristic classes theory).

1. First obstruction $o_1\in H^1(M;\pi_0 O(n))=H^1(M;\mathbb Z/2\mathbb Z)$ is nothing else but $w_1$, the first Stiefel-Whitney class. It gives the obstruction to orientability — i.e. to reducing the structure group of the bundle from $O(n)$ to $SO(n)$.
2. If the bundle is oriented, second obstruction $o_2\in H^2(M;\pi_1 O(n))=H^1(M;\mathbb Z/2\mathbb Z)$ is defined. It coincides with $w_2$ and gives the obstruction to the existence of a spin struction — i.e. to lifting structure group of the bundle from $SO(n)$ to its universal cover, $Spin(n)$.
3. Next obstruction is defined for a spin bundle; $\pi_2O(n)=0$, so first non-trivial obstruction here is $o_4\in H^4(M;\pi_3 O(n))=H^4(M;\mathbb Z)$. In fact, it coincides with $\frac12p_1$ (where $p_1$ is the first Pontryagin class of oriented bundle). And it is the obstruction to lifting the structure group from $Spin(n)$ to (infinite-dimensional) topological group $String(n)$.

…And so on: the sequence of obstructions corresponds to the Postnikov tower
$$O(n)\gets SO(n)\gets Spin(n)\gets String(n)\gets FiveBrane(n)\gets…$$
(this is a kind of duality: one can think either about sequence of extensions of the section through the filtration of $M$ by skeleta, or about sequence of lifts through the Postnikov tower of $O(n)$).

Some references. Obstruction theory in general is discussed in the section 4.3 of Hatcher — but Hatcher uses the Postnikov-towers-approach (like in the second part of the answer), AFAIR. And more classical approach + obstruction-theoretic POV on characteristic classes is explained e.g. in section 12 of Milnor-Stasheff, I believe.

One more remark. As it is explained in the other answer, ordinary (“primary”) characteristic classes can’t answer the question, since they coincide for stably equivalent vector bundles. What obstruction theory gives is, in a sense, a theory of higher characteristic classes: secondary class (a priori) defined only if primary one is zero and so on.