Let L be a line bundle on a smooth affine variety X (say, over complex numbers). Is it true that L always admits a FLAT algebraic connection?

No, any line bundle with a flat connection has a trivial rational Chern class. Now, take any smooth connected projective variety $X$ for which the Chern classes of line bundles form a group of rank $r$ larger than $1$. Removing an irreducible ample divisor $D$ from $X$ gives a smooth affine variety for which the Chern classes form a group of rank $r1$. A specific example is $\mathbb P^1\times\mathbb P^1$ but there are lots of others of any dimension $>1$. 


No, there is no reason for an an $O$module, even locally free rank 1, to be a $D$module. 

