Determining whether $\mathbb{C}[X,Y]/(P)$ is a domain, principal, or factorial from geometry. I saw recently that $\mathbb{C}[X,Y]/(Y-X^2)$ is a PID because we can show it is isomorphic to the polynomial ring $\mathbb{C}[X]$. On the other hand, $\mathbb{C}[X,Y]/(XY)$ is not even an integral domain. I am wondering if we can say when $R=\mathbb{C}[X,Y]/(P)$ is an integral domain, or PID, or UFD, just by looking at the smoothness of the curve $P$.
Even if it's hard to prove, are there theorems that say $R$ is a domain (resp. PID, resp. UFD) iff (statement about $P$)? If so, what are they?  Would it matter if we worked over $\mathbb{R}$ instead of $\mathbb{C}$?
 A: This is a somewhat incomplete answer, but too long for a comment.
$R$ is an integral domain if and only if $P$ is irreducible. Geometrically, this corresponds to the associated algebraic set having a single irreducible component.
$R$ is a Dedekind domain (i.e. Noetherian, integrally closed, dimension $1$ domain) if and only if the associated curve is normal (equivalent to smooth since curves are $1$-dimensional). This is essentially by definition of a normal variety, since $R$ will always be Noetherian and $1$-dimensional.
From this, you can conclude that for smooth curves, $R$ is a PID iff it is a UFD, as these notions are equivalent for Dedekind domains. I don't know of a nice geometric condition that is equivalent to these, but perhaps someone else does. There may be some conditional results based on genus, for example every genus zero curve will have coordinate ring a PID. 
EDIT: The converse is also true (so $R$ is a PID iff the curve has genus zero). See QiL'8's comment below.
A: Proof of PID implies genus $0$. 
Let $U$ be the affine curve defined by $R$. It is smooth. Let $C$ be the unique projective smooth curve containing $U$ as an open subset. We want to show that $C$ has genus $0$.  Let $F=C\setminus U=\{x_1, \dots, x_n\}$. Then we have an exact sequence involving divisor groups 
$$ \oplus_i \mathbb Z x_i\to \mathrm{Cl}(C) \to \mathrm{Cl}(U) \to 0 $$ 
where Cl means Weil divisors modulo linear equivalence. The right hand side map is the natural restriction and the LHS is given by $\sum_i a_ix_i \mapsto \sum_i a_i[x_i]$. The sequence is exact because any divisor in $U$ extends to $C$ with zero coefficients on the $x_i$'s, and if $D$ is a divisor on $C$ which is $0$ in $\mathrm{Cl}(U)$, then $D$ is linearly equivalent to a divisor $D'$ with support in $F$, so $D'=\sum_i a_i[x_i]$. 
Now if $R$ is a PID, then $\mathrm{Cl}(U)=0$, hence $\mathrm{Cl}(C)$ is finitely generated over $\mathbb Z$. But it contains the Jacobian $J=\mathrm{Cl}^0(C)$ of $C$. If $g(C)>0$, then $J$ has positive dimension and has infinitely many point of finite order, this contradicts the property of being finitely generated over $\mathbb Z$. So $g(C)=0$. This reasoning holds over any algebraically closed field. Over $\mathbb R$, one can argue that $J$ contains a real Lie group of positive dimension, hence is uncountable and can't be finitely generated. Over a general field $R$ being PID doesn't imply genus $0$ (example : $C$ an elliptic curve over $\mathbb Q$ such that $C(\mathbb Q)$ has only one point, take $U$ be the complement of the origin of $C$). 
Note that over an algebraically closed field $k$, once we proved $C$ has genus $0$, this implies that $U$ is isomorphic to an open subset of the affine line, so $R\simeq k[t, 1/Q(t)]$ for some non-zero polynomial $Q(t)\in k[t]$. 
An interesting question would be to characterize $R$ being a PID directly in terms of $P(X,Y)$. Some sufficient conditions are $P(X,Y)$ has degree $1$ in $X$ or in $Y$, or $P(X,Y)$ has total degree $2$. I don't know whether there are other possibilities. 
Edit I think it is hard to decribe PID in terms of $P(X,Y)$. Any automomorphism of $\mathbb C[X,Y]$ with give a $Q(X,Y)$ defining a PID, but with $Q(X,Y)$ of  different shape. For example, $X-Y^3$ can be transformed into $X-(Y+X^3)^3$ which also defines a PID, but it has degree $>2$ in $X$ and in $Y$. As the automorphism group of $\mathbb C[X,Y]$ is huge, I don't think there is a simple statement on $P(X,Y)$ which is equivalent to $R$ being a PID. 
A: To answer some of your questions and extend my comment: Many properties of the ring $\mathbb C[X,Y]/(P)$ can be expressed in terms of the polynomial, and these properties in turn relate to geometric properties of the curve. It is quite the classical result that the curve $P=0$ is irreducible if and only if $\mathbb C[X,Y]/\sqrt{(P)}$ is a domain, which is true if and only if $P$ is some power of an irreducible polynomial. The curve defined by $P$ is smooth if and only if the discriminant of $P$ vanishes nowhere. At least these two statements remain true over the real numbers as well, but algebraic geometry over the real numbers is usually harder than over an algebraically closed field.
