All orientable 2-manifolds are spin manifolds, and we know that the quantization of the first Chern number $c_1$ of a complex line bundle on 2-manifold is $\mathbb{Z}$.
For 4-manifolds, the second Chern number $c_1^2$ of a complex line bundle is $2\mathbb{Z}$ if the manifold is spin, in constrast to $\mathbb{Z}$ for a general 4-manifold.
For a general 6-manifold, the quantization of the third Chern number $c_1^3$ of a complex line bundle is $\mathbb{Z}$. However, if we require the 6-manifold to be spin and have $p_1=0$, we will have $c_1^3\in 6\mathbb{Z}$. This result can be found in sec 2.2 in http://arxiv.org/abs/hep-th/9603150
For a general 2n-manifold, the quantization of the $n^\text{th}$ Chern number $c_1^n$ should be $\mathbb{Z}$. The question is that are there any requirements on the 2n-manifolds (very likely spin plus other requirements) under which the Chern number $c_1^n$ is quantized to $n! \mathbb{Z}$ or something that is different from just $\mathbb{Z}$?
To clarify the statement, here I am implicitly assuming that the manifolds mentioned here are closed and orientable. Moreover, in more standard mathematical terms, this question is equivalent to adding extra divisibility condition to the Chern numbers. Thanks for the comments on these points from @Qiaochu Yuan.
I interpret the question to be about when we have extra divisibility conditions on Chern numbers. ("Quantization of Chern number" is a bit of a weird way to say this to a mathematician, although I guess it is in some sense more faithful to the original meaning of "quantum." In mathematics "quantization" usually refers to a process by which we take a classical object and get a quantum object.)
A general mechanism for producing such divisibility conditions is the Atiyah-Singer index theorem, which implies the following: suppose $X$ is a closed spin manifold of even dimension $2n$ with trivial $\widehat{A}$ class. Then the $n^{th}$ Chern number of any line bundle $L$ on $X$ is divisible by $n!$. This follows because the index theorem tells us that
$$\int_X \text{ch}(L) \widehat{A}(X) = \int_X e^{c_1(L)} = \int_X \frac{c_1(L)^n}{n!}$$
is the index of a certain Dirac operator, and in particular is an integer. This reproduces the result you state for $n = 3$: to reproduce the result you state for $n = 2$ we need to do a tiny bit more work and apply the index theorem twice, the first time to the trivial line bundle. (A more general version of this argument shows that we can relax the hypotheses: the top-dimensional component of the $\hat{A}$-class need not vanish. For example, when $n = 4$ we still only need $p_1$ to vanish rationally.)
So, what kind of manifolds have trivial $\widehat{A}$ class? This condition is equivalent to the vanishing of the rational Pontryagin classes of $X$, so in particular it holds if $X$ is stably parallelizable (which also implies that $X$ is spin). For example, all spheres and all Lie groups have this property. The rational Pontryagin classes also all vanish if the tangent bundle of $X$ admits a flat connection.