This question is addressed in a very recent paper of Bogomolov-Soloviev-Yotov (I don't think it is on the web yet). Among many interesting things they prove that the map from the moduli space of pairs $(C,\nabla)$ where $\nabla$ is a holomorphic connection on the trivial rank two bundle on some smooth curve $C$ is submersive whenever $\nabla$ is irreducible and $C$ is generic. With regard to Jack Evans' comment: this is a very different question than the question of determining respresentations in a real form (which has been extensively studied by Hitchin, Goldman, Garcia-Prada, etc.). It is about a holomorphic subvariety in the moduli of representations. A better analogy will be to look at the moduli space of opers which is the moduli space of holomorphic flat connections on a fixed (non-trivial) rank two vector bundle, namely, the 1-st jet bundle of a theta characteristic on the curve.