The question is in the title. The form of the condition looks like the BohrSommerfeld quantization formula of angular momentum, is there a link between the two formulas?
Indeed, the quantization of angular momentum and of spin is an example of the integrality condition in the geometric quantiation of the 2sphere, regaded as a symplectic phase space with its canonical volume form taken as the symplectic form. This is spelled out in a good bit of detail in the nLab entry geometric quantization of the 2sphere.
Generally, the integrality condition in geometric quantization affects other "internal" degrees of freedom in quantum physics similarly. For instance it plays a central role in the geometric quantization of phase spaces which are coadjoint orbits of some Lie group $G$. Here the Lie group acts by quantum operators on the resulting Hilbert space and hence geometric quantization here produces (irreducible) complex Lie group representations, a process known as Kirillov's orbit method. Physically, the representations appearing this way are precisely the quantization of the Wilson line 1d field theory inside ChernSimons theory, a phenomenon maybe first hinted at on p. 22 of Witten's famous Jones polynomial article.
What is maybe noteworthy is that in the modern cohomological formulation of geometric quantization as pushforward in Ktheory (see at quantum state space as the indexof a Spin^c Dirac operator) what matters is not primarily that the prequantum line bundle provides a lift of the symplectic form of phase space to integral cohomology (really to ordinary differential cohomology), but that it provides a lift to Ktheory. Because one finds that what is really going on in geometric quantization in the presence of a complex (Kähler) polarization is that it amounts to computing the index of the înduced $Spin^c$Dirac operator coupled to the prequantum line bundle, hence the pushforward of the prequantum line bundle regarded now as a representative of a Ktheory class. (Doing this in equivariant Ktheory produces the qauntum observables acting on the Hilbert space of states, as above in the examples of the orbit method).
So one may wonder if maybe at a deeper leverl the cohomological condition that plays a role  for instance in more general situations not covered by traditional geometric quantization, such as the quantization of Poisson manifolds  is not really one in ordinary integral cohomology, but one in Ktheory. Indeed, this turns out to be the case. For some observations along these lines see the examplessection in

$\begingroup$ Perfect, thanks Urs. I am still a bit confused about the fact that this integrality condition (which we can think of as encoding quantumness) is naturally imposed on the structure modeling the classical system $ie$ the symplectic manifold $(M,\omega)$ if we want to have a connection on the fiber bundle compatible with its hermitian structure. I find it weird because the possibility of quantizing needs some quantum information to be already encoded in the form $\omega$. Any comments? $\endgroup$ – Issam Ibnouhsein Aug 28 '13 at 18:17

2$\begingroup$ Oh, but that not every classical data admits quantization is a well familiar phenomenon. It's a "quantum anomaly". Every symplectic manifold admits a formal deformation quantization. But if one wants more, then more conditions need to be satisfied. $\endgroup$ – Urs Schreiber Aug 28 '13 at 21:05

1$\begingroup$ On the other hand, the condition that $\omega$ be integral is often not as drastic as it may seem. For the example of the 2sphere, there is only one nontrivial period (the full integral over the 2sphere) and there is the freedom to decide what Planck's constant is. So the integral of the 2form over the 2sphere can always be taken to be integral, up to possibly a readjustment of what you might mean by Planck's constant. $\endgroup$ – Urs Schreiber Aug 28 '13 at 21:07

$\begingroup$ Ok I get your point. I have a technical question: you're saying the geometric quantization fails when there is a quantum anomaly. To me quantum anomaly is about a symmetry "disappearing" when trying to quantize the system; what does symmetry have to do with the integral cohomology condition? Unless I misunderstood what you meant by quantum anomaly. $\endgroup$ – Issam Ibnouhsein Aug 28 '13 at 21:20

1$\begingroup$ Maybe check out the relation between the scale of the symplectic form and Planck's constant again: ncatlab.org/nlab/show/… . This relation means that in relatively simple cases like the 2spehere, where there is only one 2cycle, you can entirely absorb a rescaling of the symplectic form in a redefinition of Planck's constant. Conversely this means that you can quantize any symplectic form in these cases, without constraints, only that you will find that there is an integerparameterized collection of quantum systems associated with it. $\endgroup$ – Urs Schreiber Aug 29 '13 at 11:50
For a closed 2form $\omega$ on a manifold $M$, the integrality of the closed 2form, that is, $$ \int_\sigma \omega \in a{\bf Z}, \quad \mbox{for all} \quad \sigma \in H_2(M,{\bf Z}), $$ for some real number $a$, ensures the existence of a principal circlebundle $Y$ (and its associated line bundle $L$) over $M$ and a connexion $\lambda$ with curvature $\omega$. Then, it is possible to lift some groups of automorphisms of $\omega$ (subgroups of ${\rm Diff}(M,\omega)$) as groups of automorphisms of $(Y,\lambda)$. This procedure is called prequantization because it is the first step of an answer to the Dirac program of quantization consisting in representing symmetries in classical mechanics by unitary transformations in some Hilbert space (that is supposed to have a physical meaning). I would not want to develop why one needs this bundle, at the first place, to answer Dirac's program, and are not contented just with the automorphisms of $\omega$, because it will lead us too far. If you are happy with this answer I'm fine, else I'll try to say a more few words(*).
P.S. The fact that the number $a$ is required to be a multiple of $\hbar$ comes just from physics consideration.
(*) Edited: I added a few words here