Map from local systems to holomorphic line bundles on a curve Let $X$ be a Riemann surface of genus $g > 0$. Let $S$ denote the set of local systems (locally constant sheaves) on $X$ with fiber $\mathbb{C}$. $S$ is in natural bijection with $H^1(X, \underline{\mathbb{C}^{\times}})) \cong (\mathbb{C}^{\times})^{2g}$, where $\underline{\mathbb{C}^{\times}}$ is the constant sheaf on $X$ with fiber $\mathbb{C}^{\times}$. 
By the Riemann-Hilbert correspondence, each local system $\mathbb{L} \in S$ corresponds to a line bundle with a flat connection. This map is given by $\mathbb{L} \mapsto (\mathbb{L} \otimes_{\mathbb{C}} \mathcal{O}_X, \nabla = 1 \otimes d)$, where $d$ is the usual exterior derivative. Forgetting the connection gives a map from $S$ to the Picard group of $X$, $H^1(X, \mathcal{O}_X)$. This is the natural map $H^1(X, \underline{\mathbb{C}}^{\times}) \to H^1(X, \mathcal{O}_X^{*})$, so in particular it is a map of abelian groups.
What is the description of this map? In particular, I do not know how to show it has non-trivial image, i.e., that there is a non-trivial holomorphic line bundle that admits a flat connection.
It follows from Chern-Weil theory that the image is contained in the Jacobian (as the curvature of a connection is essentially the first Chern class). The identification of $S$ with $(\mathbb{C}^{\times})^{2g}$ is non-canonical, but the topology this gives to $S$ is canonical. I think one can show that this map is continuous by thinking about cocycles, which gives another proof that the image is in the Jacobian. 
 A: I think the following theorem answers your question.

Theorem: Let $X$ be a smooth, proper connected curve over $\mathbf C$ with a line bundle $\mathscr L$. Then $\mathscr L$ admits a flat connection $\nabla$ if and only if $c_1(\mathcal L)=0$.  

Remark: A more general statement would be that a line bundle $\mathscr L$ on a compact Kahler manifold admits an integrable connection if and only if $c_1(\mathscr L)\otimes \mathbf Q=0$.
Before we go to the proof of this theorem, we recall that define the first Chern class as the connecting homomorphism 
$$
c_1\colon \mathrm{Pic}_X=\mathrm{H}^1(X,\mathscr O_X^*) \to \mathrm{H}^1(X,\mathbf Z(1))
$$
that comes from the exponential short exact sequence
$$
0 \to \mathbf Z(1) \to \mathscr O_X \xrightarrow{exp(-)} \mathscr O_X^* \to 0 \ .
$$
Proof: The essential idea is to relate the exponential sequences for $\mathbf C$ and $\mathscr O_X$ with each other. More precisely, we have a morhpism of short exact sequences:
$$0 \to \mathbf Z(1) \to \mathscr O_X \to \mathscr O_X^* \to 0 \\
\downarrow  \\
0 \to \mathbf Z(1) \to \underline{\mathbf C}  \to \underline{\mathbf C}^* \to 0 \ .
$$
So we have a commutative diagram
$$
\mathrm{H}^1(X,\mathbf C) \to \mathrm{H}^1(X,\mathbf C^*) \xrightarrow{\delta} \mathrm{H}^2(X,\mathbf Z(1)) \\ 
\downarrow \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \downarrow  \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \downarrow{\mathrm{Id}} \\ 
\mathrm{H}^1(X,\mathscr O_X) \to \mathrm{H}^1(X,\mathscr O_X^*) \xrightarrow{c_1} \mathrm{H}^2(X,\mathbf Z(1) \ .
$$
Step 1. The map $\delta$ is the zero map. 
Probably the easiest way is to say that $\mathrm{H}^1(X,\mathbf C^*)=(\mathbf C^*)^{2g}$ and $\mathrm{H}^2(X,\mathbf Z(1))=\mathbf Z$. But there are no non-trivial homomorphisms from $(\mathbf C^*)^{2g}$ to $\mathbf Z$.
Step 2. The map $c_1(\mathscr L)=0$ if $\mathscr L$ admits a flat connection. 
Riemann-Hilbert correspondence says that $\mathscr L$ admits a flat connection if and only if it lies in the image of $\mathrm{H}^1(X,\mathbf C^*) \to \mathrm{H}^1(X,\mathscr O_X^*)$. Combining it with Step 1, we conclude the claim. 
Step 3. If $c_1(\mathscr L)=0$ then $\mathscr L$ is in the image of $\mathrm{H}^1(X,\mathbf C^*) \to \mathrm{H}^1(X,\mathscr O_X^*)$.
This easily follows from the commutative diagram above and the fact that $\mathrm{H}^1(X,\mathbf C) \to \mathrm{H}^1(X,\mathscr O_X)$ is surjective. The latter fact is, in turn, a consequence of degeneration of the Hodge-to-de Rham spectral sequence 
$$
\mathrm{E}^{p,q}_2=\mathrm{H}^q(X, \Omega^p_X) \Rightarrow \mathrm{H}^{p+q}(X, \mathbf C) \ .
$$ 
Step 4. If $c_1(\mathscr L)=0$ then $\mathscr L$ admits a flat connection.
Again, this is just a consequence of Step 3 and Riemann-Hilbert Correspondence.
