Here is a proof of YCor's claim that the group is $2$-generated if and only if $V:=(Z/pZ)^n$ is isomorphic as a $(Z/qZ)^2$-module to a direct sum of distinct nontrivial irreducible modules.
For the "only if" part it is sufficient to consder the case when $V = W \oplus W$ is a direct sum of two isomorphic modules, and to prove that $G$ is not $2$-generated in that case.
Suppose for a contradiction that $G$ is $2$-generated. Then the two generators must have the form $xv$ and $yw$, where $\langle x, y \rangle \cong (Z/qZ)^2$ is a complement in the semidirect product, and $v,w \in V$. Since $V$ is assumed to be nontrivial, $x$ and $y$ cannot both act trivially on $V$, so suppose that $x$ does not. Then $xv$ has order $q$ and is conjugate to $x$, so we may assume that $v=1$. But any element in $V$ is contained in a $(Z/qZ)^2$-submodule of $V$ isomorphic to $W$, so $\langle x,yb \rangle \le \langle x,y,b \rangle \ne G$, contradiction.
Conversely, suppose that $V \cong \oplus_{i=1}^k V_i$, with $V_i$ pairwise non-isomorphic $(Z/qZ)^2$-submodules, and let $0 \ne v_i \in V_i$.
Again by nontriviality, $x$ and $y$ cannot both act non-trivially on any $V_i$, and we can order the $V_i$ such that, for some $j$ with $0 \le j \le k$, $y$ acts nontrivially on $V_1,\ldots,V_j$ and $x$ acts nontrivially on $V_{j+1},\ldots,V_k$.
Let $H= \langle xv_1\cdots v_j, yv_{j+1}\cdots v_k \rangle \le G$. We claim that $H=G$.
To see this, observe that the commutator
$$ [ xv_1\cdots v_j, yv_{j+1}\cdots v_k] = [v_1,y]\cdots[v_j,y][x,v_{j+1}] \cdots [x,v_k], $$
which is a product of nontrivial elements, one from each $V_i$. The submodule of $V$ generated by this element projects nontrivially onto each $V_i$, and so it must be equal to $V$. Hence $V \le H$, so $H=G$ as claimed.
I think that if you allow trivial irreducible submodules of $V$ then, as in the previous problem, you can also have up to two of these in a $2$-generated group.
PS: I see that I missed the fact mentioned by YCor that $Z(G)=1$ implies that $V$ must be a faithful module.