Say $x_n$ is the sequence consisting of $n$ ones followed by all zeroes, as in that post. Let $E_n=\{x_n,x_{n+1},\dots\}$.
Then $E_n$ is weakly closed (details below). If the unit ball of $c_0$ were weakly compact then $E_n$ would be weakly compact. But that's impossible, since the intersection of any finite number of $E_n$ is non-empty but the intersection of all the $E_n$ is empty.
Details regarding why $E_n$ is weakly closed:
Given $x\in c_0$, a finite set $F\subset\Bbb N$, and $\epsilon>0$ let $V(x,F,\epsilon)$ be the set of all $x'\in c_0$ such that $|x'(j)-x(j)|<\epsilon$ for every $j\in F$. Then $V(x,F,\epsilon)$ is weakly open, because for each $j$ the map $x\mapsto x(j)$ is weakly continuous.
Now note that $x\in c_0$ is an element of $E_n$ if and only if (i) $x(j)$ is $0$ or $1$ for every $j$, (ii) $x(j)=1$ for all $j\le n$ and (iii) if $x(j)=0$ and $k>j$ then $x(k)=0$. Hence if $x\notin E_n$ there exist $F$ and $\epsilon$ such that $V(x,F,\epsilon)\cap E_n=\emptyset$. So the complement of $E_n$ is weakly open.