We need $k$ to be an infinite field. If $k$ is finite, since point sets are closed in the Zariski topology, we could find two proper closed sets (the union of all but one point of $X$) whose union is all of $X$.
Suppose $U\cap V = \emptyset$. Then $X = (U\cap V)^{c} = U^{c} \cup V^{c}$.
Since $U$, $V$ are open, $U^{c} = V(I)$, $V^{c} = V(J)$ for some ideals $I,J$ of $k[x_{1},...,x_{n}]$. We have then that $X = V(I) \cup V(J) = V(IJ)$.
$I,J\neq (0)$ since $V(I),V(J)$ are proper subsets of $X$. So $IJ \neq (0)$ also since $k[x_{1},...,x_{n}]$ is an integral domain.
Thus there exists an $f\in IJ\setminus \{0\}$ such that $f$ vanishes at all points of $X$. Note that $f$ must in fact be nonconstant.
This is now where we use the fact that $k$ is infinite. Since $f$ is nonconstant, there exists an $i\in\{1,...,n\}$ such that $f$ has a nonzero term with a nonzero power of $x_{i}$ in it. Suppose for convenience of notation that $i=1$. We can then write $f = g_{m}(x_{2},...,x_{n})x_{1}^{m}+ ...+ g_{0}(x_{2},...,x_{n})$ for some $g_{0},...,g_{m}\in k[x_{2},...,x_{n}]$, $g_{m}\neq 0$, and $m>0$. So there is a $(a_{2},...,a_{n})\in k^{n-1}$ with $g_{m}(a_{2},...,a_{n})\neq 0$.
Then $f(x_{1},a_{2},...,a_{n})\in k[x_{1}]$ is nonzero, so can only have finitely many roots. This is a contradiction since $k$ is infinite, and $f$ must vanish at all points of $X=k^{n}$.