Yes, $f^{-1}(I)$ is always weakly open. It must be, because the weak topology is the coarsest topology that makes (norm) continuous functionals continuous. Since $I$ is open in $\mathbb{R}$, the inverse image $f^{-1}(I)$ is open in the weak topology.
To ask whether such sets generate the weak topology is a slightly different question, but yes, these sets form a sub-basis for the weak topology.
As for your other question about why $x_n \rightharpoonup x$ is equivalent to $f(x_n) \to f(x)$ for all $f \in X^*$, one direction is not hard to prove. If $x_n \rightharpoonup x$, $f \in X^*$, and $\varepsilon > 0$, then $f^{-1}(f(x) - \varepsilon, f(x) + \varepsilon)$ is weakly open (as above), contains $x$, and so $x_n$ must eventually lie in this set. That is, there must be some $N$ such that
\begin{align*}
n > N &\implies x_n \in f^{-1}(f(x) - \varepsilon, f(x) + \varepsilon) \\
&\implies f(x_n) \in (f(x) - \varepsilon, f(x) + \varepsilon) \\
&\implies |f(x_n) - f(x)| < \varepsilon,
\end{align*}
as required.
On the other hand, let's suppose $f(x_n) \to f(x)$ for all $f$. We need to show that, given any weakly open neighbourhood $U$ of $x$, the sequence $(x_n)$ eventually lies inside this neighbourhood.
Recall that $U$ is a union of sub-basic sets. In particular, $x$ must be contained in a set of the form
$$V = \bigcap_{k=1}^m f_k^{-1}(I_k)$$
where $I_k$ is an open interval, and $V \subseteq U$. Then, since $f_k(x_n) \to x$ as $n \to \infty$, for all $k$, there must exist some $N_k$ such that
$$n > N_k \implies f_k(x_n) \in I_k \implies x_n \in f_k^{-1}(I_k).$$
Taking $N = \max\{N_1, \ldots, N_k\}$, we get
$$n > N \implies x_n \in \bigcap_{k=1}^m f_k^{-1}(I_k) \subseteq U.$$