Suppose $X$ is integral and noetherian. Let $x$ be a point in the support of $D$. Then $D$ is represented by a rational function $f$ at $x$.
If the support has codimension $\ge 2$ at $x$, then, after shrinking $X$ around $x$ if necessary, $f$ is regular and invertible outside of a closed subscheme of codimension $\ge 2$.
(2)-(3) When $X$ is normal, this implies by Zariski's extension theorem that $f$ is regular. Its zero set is of codimension $1$ or empty by Krull's principal ideal theorem, so it must be empty. Thus $f$ is regular and invertble, and this contradicts the hypothesis that $x$ is the support of $D$.
So when $X$ is normal, the support is empty or has pure codimension $1$.
(1) If $X$ is not normal, the support of $D$ can have codimension $\ge 2$. It is enough to find a rational function which is regular and invertible outside of a closed subscheme of codimension $\ge 2$.
To construct such an example, take an afine integral variety $X$ over an algebraically closed field with a unique non-normal point $p$, of any dimension $d\ge 2$ (e.g. identify two closed points in the affine space of dimension $d$). Let $f$ be a regular function on the normalization $X′$ of $X$, but not regular on $X$. Take a scalar $c$ in the ground field such that $c\ne f(q)$ for every $q\in X′$ lying over $p$. Then, shrinking $X$ around $p$ if necessary, $f−c$ is invertible in $O_{X'}(X′)$ and is a non-regular rational function on $X$. The support of the Cartier divisor $D:=\mathrm{div}(f−c)$ on $X$ is just $p$ because $X'\to X$ is an isomorphism outside of $p$, hence the support has codimension $d\ge 2$ in $X$.