Principal Bundle with given Curvature Hey,
For personal exercising purposes I try to give a proof, that a U(1)-principal-bundle has curvature $\alpha$ iff the cohomology class of $\alpha$ is integral:
By the Cech-deRham-isomorphism a $[\alpha] \in H^2_{DR}(M, \mathbb{Z})$ iff $[\alpha] \in H^2_{Cech}(M, \mathbb{Z})$. Then we can use the isomorphism $H^2_{Cech}(M, \mathbb{Z}) \tilde= H^1_{Cech}(M, U(1))$ to construct an U(1)-principal bundle P up to equivalence by defining its transition functions.
To define a connection 1-Form $\varphi$ use the local trivialization $h_j: U_j \times U(1) \mapsto \pi^{-1}(U_j)$ and set
\begin{equation}
h_j^* \varphi = \pi^* \beta_j + d\vartheta,
\end{equation}
where $d \beta_j = \alpha$ on $U_j$ and $\vartheta$ is the coordinate in U(1). This defines a connection with curvature $d \varphi = \alpha$.
I think this should it be. Any remarks/corrections are welcome!
But I read, that the various choices of such an principal bundle with given curvature are parametrized by $H^1(M,U(1))$, which in view of my proof makes absolutely no sense! Where lies the error?
Thank you for your help!   
P.s. - a second question: How does the curvature of the principal bundle defines the curvature of an associated (line)bundle? In the special case of a U(1)-bundle with curvature $\alpha$ and the representation $x \mapsto exp(-i k x)$, is the curvature of the assoziated line bundle given by $k \cdot \alpha$??
 A: EDIT: I'm not very happy the the exposition below. But I hope you get the idea.
Your proof is correct. Given a principal bundle with connection having the given curvature, and a second connection on a possibly different with the same curvature, the difference between the two is a bundle with a flat connection (note that the category of $U(1)$-bundles with connection is a symmetric 2-group). Thus one gets an ambiguity in the choice of bundle and connection. This information is reflected in the short exact sequence
$$
0 \to H^1(M,U(1)) \to \check{H}^1(M) \to \Omega^2_\mathbb{Z}(M) \to 0
$$
where the left cohomology group has discrete coefficients and classifies bundles with flat connections, and the group on the right is that of integral differential 2-forms on $M$. The central group is the ordinary differential cohomology of $M$. One way it may be thought of is as a moduli space (which has a group structure) of $U(1)$-bundles with connection. The right map is the map that sends a bundle with connection to its curvature form.
There is another short exact sequence dealing with the characteristic class of the bundle, see Proposition 1 at this nLab page. It describes the kernel of the (surjective) homomorphism $\check{H}^1(M) \to H^2(M,\mathbb{Z})$, sending a bundle with connection to its first Chern class (which one can think of as being a Cech class).
A: I'm late to the party with this answer, but the question is on the front page, so whatever.
As David essentially said, given any $\mathrm{U}(1)$-bundle/connection pair over $M$ with connection $\alpha$, one can obtain any other bundle/connection pair by tensoring with a flat bundle over $M$. Flat bundles are characterized by $H^1(M, \mathrm{U}(1))$, which is isomorphic to the character group of $\pi_1(M)$ (for $M$ path-connected at least). One way to see this, which is less powerful than David's characterization, but a bit easier to grasp, is that a flat connection on a (right) $G$-bundle $P$ is equivalent to an involutive, hence integrable, distribution on $P$. We can lift any curve starting at $m\in M$ to a horizontal curve through any $p\in\pi^{-1}(m)$, where $\pi:P\rightarrow M$ is the bundle projection. The maximal integral manifold of the distribution through $p$ is actually a covering space of $M$ via $\pi$, and so it follows that lifts through $p$ of homotopic curves in $M$ are homotopic in $P$, and have the same endpoint. Call this endpoint $E_p([\gamma])$, where $[\gamma]$ is the homotopic class of the curve $\gamma$. If $\gamma$ is a closed curve, then the endpoint of its lift lies in the same fiber as $p$, and we can write
$$
E_p([\gamma]) = p\cdot\chi_p([\gamma]^{-1})
$$
where $\chi_p:\pi_1(M)\rightarrow G$. It is not difficult to show that $\chi_p$ is a homomorphism. $P$ can then be reconstructed as the quotient of the trivial bundle $\widetilde{M}\times G$ with the obvious flat connection under the equivalence relation
$$
([\delta],g) \sim (\[\gamma]*[\delta],\chi_p([\gamma])g)
$$
by mapping $\left[[\delta],g\right]_\sim\mapsto E_p([\delta])\cdot g$. Here $\widetilde{M}$ is the universal covering space of $M$, thought of as classes of homotopic curves starting at $m$.
Hence all such flat bundles are characterized by the set of homomorphisms $\chi_p:\pi_1(M)\rightarrow G$, which in the case $G=\mathrm{U}(1)$ is just the character group of $\pi_1(M)$. (It's very easy to screw up the conventions here; hopefully I haven't.)
To answer your second question, it depends what you mean by "curvature in the line bundle". Normally one would think of the curvature $\alpha$ as a $\mathfrak{g}$-valued two-form on $P$. Maybe this is what you're getting at: given a representation $\lambda:G\rightarrow \mathrm{GL}(V)$ on the vector space $V$, we form the vector bundle $P\times_\lambda V$ associated to $P$. Similarly we can form the associated bundle $P\times_{\mathrm{Ad}}~\mathfrak{g}$, where $\mathrm{Ad}:G\rightarrow \mathrm{GL}(\mathfrak{g})$ is the adjoint representation. The infinitesimal $\mathfrak{g}$-action $\lambda'(\xi)v = \frac{d}{dt}\lambda(\exp(\xi t))v\big\vert_{t=0}$ on $V$ induces a well-defined action of $P\times_{\mathrm{Ad}}~\mathfrak{g}$ on $P\times_\lambda V$. 
Using the curvature $\alpha$ we define a $P\times_{\mathrm{Ad}}~\mathfrak{g}$-valued 2-form on $M$, given by
$$
\beta_m(X_m,Y_m) = [p,\alpha_p(A_p,B_p)]_{\mathrm{Ad}}
$$
where $A_p, B_p$ are (arbitrary) lifts of $X_m, Y_m$ to $p\in \pi^{-1}(m)$. The fact that $\alpha$ vanishes on vertical vectors, coupled with the $G$-equivariance of $\alpha$, ensures that $\beta$ is well-defined. 
It's possible (and a worthwhile exercise) to prove that
$$
([\nabla_X,\nabla_Y]-\nabla_{[X,Y]})s = \beta(X,Y)\cdot s
$$
where $s$ is a section of the associated vector bundle $P\times_\lambda V$. (The left hand side appears to depend on the vector fields $X,Y$, but in fact at a particular point it just depends on their values at that point.)
If one expresses $s$ in terms of its corresponding $G$-equivariant function $\widetilde{s}:P\rightarrow V$, i.e.
$$
s(m) = [p,\widetilde{s}(p)]_\lambda \qquad\textrm{any }p\in\pi^{-1}(m)
$$
then this unpacks to
$$
\left[p, ([X^h,Y^h]-[X,Y]^h)_p \widetilde{s}(p)\right] _
\lambda = \left[p, \lambda'(\alpha_p(X^h_p,Y^h_p)) \widetilde{s}(p)\right]_\lambda
$$
($X^h$ being the horizontal lift of $X$ etc.)
As with the curvature $\alpha$, in the case when $G$ is abelian you don't need to go to all this trouble, and can just define $\beta$ as a $\mathfrak{g}$-valued 2-form on $M$. Then as you guessed, these 2-forms are related by $\beta=\lambda'\circ\alpha$.
