The answer is no: Let $X$ the projective plane $\mathbb P^2$ minus a smooth
quadric $Q$. Then $[X]=[\mathbb P^2]-[Q]=\mathbb L^2+\mathbb L+1-(\mathbb
L+1)=[\mathbb A^2]$ but $X$ is not isomorphic to $\mathbb A^2$ as its Picard group is
$\mathbb Z/2$. For b) just cross $X$ with $\mathbb G_m^n$, the Picard group is still $\mathbb Z/2$.
For the singular case the following is an interesting example: Let the symmetric group
$\Sigma_n$ act on $(\mathbb A^m)^n$ by permuting the factors. Then it is a fact
(proved by Totaro, see Lemma 4.4 of L. Göttsche, On the motive of the Hilbert
scheme of points on a surface, Math. Res. Lett. 8 (2001), no.~5-6, 613--627.)
that the class of $(\mathbb A^m)^n/\Sigma_n$ in the Grothendieck group of
varieties is equal to that of $\mathbb A^{mn}$. However, when $m>1$ then the
quotient is always singular and hence not isomorphic to $\mathbb A^{mn}$.
Addendum: In response to the further question by Alexander, I can't think
of any strengthening that would make it true. For a moment I thought that if one
instead asked that $X$ be smooth and proper and have the same class as $\mathbb
P^n$ would imply that $X$ is isomorphic to $\mathbb P^n$. That however is
counterexampled by a smooth quadric of odd dimension greater than $1$. We can
project from a point to make the blowing up of one point isomorphic to the
blowing up of a smooth quadric of $\mathbb P^n$ which gives that the class of
$X$ is equal to $\mathbb P^n$. On the other hand $X$ is not isomorphic to
$\mathbb P^n$ as its cohomology ring is not generated by its degree $2$ part.
Addendum 1: Some comments related to Alexander's latest question. It is known that the stable birational class of $X$ can be recovered from the class $[X]$. Let us assume that we actually get that it determines the birational class (this may very well always be true and is true in small dimensions).
-
For curves (we shall always assume that $X$ is smooth and irreducible) we get that we can recover the projective model of $X$ but as $[X]$ is equal to the class of the projective model minus a number of points we see that if $[X]$ is not proper we can not recover which points we have removed from the projective model to get $X$. Hence the reconstruction problem is reasonable only when $X$ is also proper which we shall assume.
- Let us consider a ruled surface $X\to C$ with fibres $\mathbb P^1$'s. If we blow up a point on a fibre and then blow down the strict transform of the fibre containing the point, we get a new ruled surface which in general (ever?) is not isomorphic to $X$ but has the same class.
- On the other hand in the case of non-ruled surfaces we have a minimal model such that all other surfaces birational to it is constructed by a succession of blowing ups. Hence we can distinguish the minimal model from all other birational surfaces. However, we can not tell which points we have blown up and by blowing up different points we get different surfaces.
- In higher dimensions things seem worse as there almost never is a unique minimal model. For instance the two small resolutions of an ordinary double point in three dimensions have the same class but are in general non-isomorphic.
- There are a few cases where a minimal model is unique. The one that comes to mind is when $X$ is an abelian variety in which case $X$ can actually be recovered from its class.
Hence I think that there will only be a very limited number of situations when one can hope to recover $X$ from its class.