3 added 1 characters in body

As observed in some of the previous comments, every closed (=compact, without boundary) orientable real 2-manifold admits a complex structure. So in the smooth case orientability is essentially the only obstruction.

If one also considers the case of singular real algebraic surfacesurfaces, the situation is more involved and I don't know whether satisfactory results are known.

Anyway, one obvious obstruction is the presence of non-isolated singularities, since every complex curve has only a finite number of singular points.

For instance, take $X:=S^1 \times C$, where $C \subset \mathbb{RP}^2$ is the nodal real cubic of equation $y^2z=x^3+x^2z$. The singular locus of $X$ is isomorphic to $S^1$, so $X$ surely cannot be endowed with the structure of a complex algebraic curve.

Post Undeleted by Francesco Polizzi
For instance, take $X:=S_1 X:=S^1 \cup S_2$times C$, where$S_1, S_2 C \subset \mathbb{R}^3$are two spheres intersecting along a circle. Then mathbb{RP}^2$ is the nodal real cubic of equation $y^2z=x^3+x^2z$. The singular locus of $X$ is isomorphic to $S^1$, so $X$ surely cannot be endowed with the structure of a complex algebraic curve.