For question 2:
If $a_n \to 0$ as $n \to \infty$, then $f$ is continuous at all irrationals, and thus a.e., as $\lim_{t \to x} f(t) = 0$ for every $x$.

If $\limsup_{n \to \infty} a_n > \varepsilon > 0$, then $\{x: f(x) > \varepsilon\}$ is dense, and $f$ is discontinuous everywhere.

For question $2$: if $a_q \ge c q^{-2}$ for some $c > 0$, $f$ is nondifferentiable everywhere, while if $a_q = O(q^{-\eta})$ for some $\eta > 2$, $f$ is differentiable a.e. But I don't think you can say it is differentiable a.e. if $a_q = o(q^{-2})$.

EDIT: In fact (see Khinchin's book, "Continued Fractions") for almost every $x$ there are infinitely many $p/q$ with $|x-p/q| < 1/(q^2 \ln(q))$, but for $\varepsilon > 0$, only finitely many with $|x -p/q| < 1/(q^2 \ln(q)^{1+\varepsilon})$. In particular, for $a_q = q^{-2}/\ln(q)$ which is $o(q^{-2})$, $f$ is nondifferentiable almost everywhere.