(Disclaimer. The previous version of this answer contained serious mistake: it didn't take into account non-triviality of the action of $\pi_1$ on $\pi_2$.)
Claim. The set $[\mathbb T^2,X]_*$ (of pointed maps) can be identified with the set
$$\{(a,b)\in\pi_1(X)^2|ab=ba\}\times\pi_2(X)/\langle t-t^a,t-t^b\mid t\in\pi_2\rangle,$$
where $(-)^\gamma$ denotes the action of $\pi_1$ on $\pi_n$.
And if $\pi_1$ acts trivially on $\pi_2$, $[\mathbb T^2,X]_\ast\approx\{(a,b)\in\pi_1(X)^2|ab=ba\}\times\pi_2(X)$. In particular, if $\pi_1(X)=0$, $[\mathbb T^2,X]_\ast=[\mathbb T^2,X]\cong\pi_2(X)=H_2(X)$.
Proof (sketch). Indeed, parallel and meridian of $\mathbb T^2$ maps to a pair of elements of $\pi_1(X)$ and the 2-cell of the torus maps to a null-homotopy of $aba^{-1}b^{-1}$, but homotopies between trivial loop and some other null-homotopic loop can be identified (non-canonically!) with $\pi_2(X)$.
Let's see if this element of $\pi_2$ is well-defined. If we move $a$ by some (pointed) homotopy $t$ (that can be again identified with an element of $\pi_2$), we get $s'=s+t-t^b$ (in particular, if either both $a$ and $b$ are trivial or $\pi_1(X)$ acts trivially on $\pi_2(X)$, the element $s$ is well-defined).
/* This kind of elementary obstruction theory (cf.) can be applied, I believe, to any 2-dimensional CW-complex $S$ giving (in the case $\pi_1(X)$ acts trivially on $\pi_2(X)$) $[S,X]\approx H^1(S;\pi_1(X))\times H^2(S;\pi_2(X))$. But in higher dimensions the situation becomes more complicated. */
So, for example,
$$[\mathbb T^2,\mathbb CP^\infty]\cong\pi_2(\mathbb CP^\infty)\cong\mathbb Z.$$
But, say,
$$[\mathbb T^2,\mathbb R P^2]_\ast\cong(\mathbb Z/2)^2\times\mathbb Z/{\sim}\cong\{(0,0)\}\times \mathbb Z\sqcup\{(0,1),(1,0),(1,1)\}\times\mathbb Z/2$$
(if the element of $\pi_1^2$ is nontrivial, the element of $\pi_2$ is defined only mod 2; and in non-pointed case all $\mathbb Z$ become $\mathbb N$; ref).