This is also an incomplete answer but from a different angle than the previous ones. Let $A=\begin{pmatrix} a&b\\c&d\end{pmatrix}$.
EDIT: the answer below only deals with the orientable case $\det(A)=1$. The rational cohomology in the nonorientable case can be handled similarly.
The picture will look qualitatively different depending on whether the eigenvalues have absolute values 1 (corresponds to trace of $A$ equal to 0 or $\pm 2$) or not.
If $tr(A)\ne 0, \pm 2$ then $|\lambda_i(A)|\ne 1$ and the resulting 3-manifold is a solvmanifold. In this case the commutator of $\pi_1(M)$ has rank 2, hence the abelianization of $\pi_1(M)$ has rank 1 and therefore both $H^1(M)$ and $H^2(M)$ have rank 1.
Over $\mathbb Q$ (or $\mathbb R$ ) the generator of $H^1(M)$ comes from the pullback of the generator of the base circle as can be seen from the fact that the original bundle has a section. Using Poincare duality we now easily get the cup product structure on $H^*(M,\mathbb Q)$. There are generators $a\in H^1(M)\cong \mathbb Q, b\in H^2(M)\cong \mathbb Q, c\in H^3(M)\cong \mathbb Q$ and $a^2=0, ab=c$.
The other case when $|\lambda_i(A)=1|$$|\lambda_i(A)|=1$ gives infranilmanifolds. Let me discuss the nil case when $tr(A)=2$ and $\lambda_1=\lambda_2=1$. Then in appropriate coordinates on $T^2$ the mapping matrix $A$ reduces to $\begin{pmatrix} 1&k\\0&1\end{pmatrix}$.
This actually can be viewed as an $S^1$ bundle $S^1\to M\to T^2$ over a 2-torus (made out of the base circle and the first meridian of $T^2$ which is fixed by $A$) . The number $k$ is the Euler class of this circle bundle. You can get cohomology from the Gysin sequence of this circle bundle. Rationally it's very simple. When $k=0$ you just get $T^3$ and when $k\ne 0$ the minimal model of this is given by the free dga $(\Lambda (x,y,z), d)$ where $\deg x=\deg y=\deg z=1$ and $dx=dy=0, dz=xy$. The cohomology of this algebra is the rational cohomology algebra of $M$: $x$ and $y$ are generators of $H^1$, $xz, yz$ are generators of $H^2$, $t=xyz$ is a generator of $H^3$ and the cup products are:
$xy=0, x(xz)=y(yz)=0, x(yz)=-y(xz)=t$.
Here $x$ and $y$ are generators of $H^1(T^2)$ where $T^2$ is the base torus.
The last case is infranil which in appropriate basis corresponds to $A=\begin{pmatrix} -1&k\\0&-1\end{pmatrix}$ or $A=\begin{pmatrix} 0&1\\-1&0\end{pmatrix}$. These are finitely covered by the nilmanifolds (with covers of order 2 or 4 respectively) and need to be handled separately. In this case the commutator again has rank 2 so the answer is similar to the solv case.