For a closed manifold $X$, suppose $b_2(X)=0$.
Question: For any complex line bundle $L\to X$, can we always find a flat connection, i.e. does there exist a connection $\nabla$, such that $\nabla^2=0$?
The structural group of the bundle is $C-\{0\}$. Since $S^1$ is the maximal compact subgroup of $C-\{0\}$, you have a $S^1$-reduction of the bundlle. Consider a trivialization $(U_i)_{i\in I}$ of the bundle. The connection is defined by $d+\omega_i$ where $\omega_i$ is a $1$-form which takes its values in the Lie algebra of $S^1$ which is $R$, the curvature is $d\omega_i+\omega_i\wedge \omega_i=d\omega_i$ since the Lie algebra of $R$ is commutative. The family of form $d\omega_i$ defined a closed $2$-form $\Omega$ on $M$ which is the curvature.
Suppose that $b_2(M)=0$, then $[\Omega]\in H^2(M,R)=0$. This implies that there exists a $1$-form $\alpha$ such that $d\alpha=\omega$. Consider the connection form defined locally by $\omega'_i=\omega-\alpha_{\mid U_i}$, the curvature of $\omega'$ is $\Omega-d\alpha=0$.