Let $X$ be a variety over a field $k$ (here, varieties are smooth, geometrically connected) and $p,q$ two closed points of $X$. Assume that $X$ is of dimension at least $2$.
Is there an irreducible closed subset of codimension $1$ of $X$ containing both $p$ and $q$?
I assume you meant that these are finite type over $k$. Here is a lovely argument (at least when $k$ is algebraically closed) due to C. P. Ramanujam (and you can read it in his collected works).
First, (not so important), you can take the projective closure of $X$ (smoothness is irrelevant) and thus assume $X$ is projective. Then blow up $p,q$ to get $Y\to X$. $Y$ is projective and so a general hyperplane section $Z$ is irreducible by Bertini's theorem. Since the exceptional divisors meet $Z$ (hyperplane sections meet all positive dimensional subvarieites), the image of $Z$ is an irreducible divisor passing through $p,q$.