When is an algebraic variety $\mathbb{Q}$-factorial? A variety is $\mathbb{Q}$-factorial if every global Weil divisor is $\mathbb{Q}$-Cartier. How bad singularities are allowed so that the algebraic variety is still $\mathbb{Q}$-factorial? Is a singular curve $\mathbb{Q}$-factorial? For example is a nodal-cuspidal plane curve $\mathbb{Q}$-factorial?
 A: A complete intersection $X$ in $\mathbb{P}^n$ is $\mathbb{Q}$ factorial if $\dim X_{sing}<\dim X-3$.
In general being $\mathbb{Q}$-factorial depends on the type of singularity you have, but also on the position of the singularities.
E.g., a degree $d$ threefold $X$ in $\mathbb{P}^4$ with only ordinary double points at $p_1,\dots,p_k$ is $\mathbb{Q}$-factorial if and only if the linear system of homogeneous polynomials of degree $2d-4$ polynomials through the singular points of $X$ has no defect (i.e., the codimension of this linear system is precisely $k$).
An example of a non-$\mathbb{Q}$-factorial threefold with only nodes is $f_1f_2+f_3f_4=0$, where $\deg(f_1)+\deg(f_2)=\deg(f_3)+\deg(f_4)$, and the $f_i$ are chosen sufficiently general.
A: I saw this a while ago, and I assumed that someone would give you an answer, but it doesn't
look like anyone will. So I'll make an attempt. 
As Ulrich suggests, it is  better to stick to
normal varieties, so your nodal/cuspidal curves are immediately eliminated. So we should move to dimension at least two. 
A very simple class of examples are cones. Let $V\subset \mathbb{P}^N$ be a nontrivial smooth variety, 
and let $R$ be the local ring of the vertex of the cone over $V$. This is normal and $\dim R\ge 2$. $R$ (or $Spec R$) is $\mathbb{Q}$-factorial exactly 
when $Cl(R)\otimes\mathbb{Q}=0$ where $Cl(R)$ is  the (Weil) divisor class group. Now
according to Lipman "Unique factorization in complete local rings", Alg. Geom, Arcata (1974)
$$Cl(R)= Cl(V)/\langle\text{hyperplane}\rangle$$

Thus $R$ is $\mathbb{Q}$-factorial if and only  if the 
  $Cl(\mathbb{P}^N)\otimes \mathbb{Q}\to Cl(V)\otimes \mathbb{Q}$ is surjective. 

This is generally not true. For example, if $V$ is a curve, $R$ is $\mathbb{Q}$-factorial if and only if $V$ has genus $0$. 
Added Notes: (1) In the last sentence, I meant that a cone over a higher genus
curve $V$  cannot be $\mathbb{Q}$-factorial because $\dim Cl(V)\otimes \mathbb{Q}=\infty$
in this case. (2) As Ulrich & Francesco point out $V$ should be projectively normal. For
example, it would suffice to assume the $V$ is a hypersurface. (3) I forgot to say, that
I'm working over an algebraically closed ground field.
