I just gave an extended answer to this question which was eaten by captcha, but here is a short recap:

**Real quadratic fields**: Any odd abelian group $A$ should occur as the odd part of the class group for a positive density of discriminants (this is **explicitly** in Cohen-Lenstra). One thus expects that: any abelian group $A$ should occur as the class group with positive *relative* density amongst class groups which, by genus theory, have the same $2$-rank as $A$. These claims are all conjectural and nothing is known.

**Imaginary quadratic fields**: Conjecturally, the $p$-part of the class group is $O(|\Delta_F|^{\epsilon})$. On GRH, the $p$-part of the class group is $O(|\Delta_F|^{\delta +\epsilon})$ for some explicit constant $\delta < 1/2$ depending on $p$. For $p = 2$ this is unconditionally true by genus theory. For $p =3$ this is also unconditionally true, by Pierce, Helfgott-Venkatesh (independently), and later Ellenberg-Venkatesh.

By Brauer-Siegel, the class group has order at least $O(|\Delta_F|^{1/2 - \epsilon})$. Hence:

** Unconditionally:** For any abelian fixed group $A$, the groups $A \oplus (\mathbf{Z}/2 \mathbf{Z})^n$ and $A \oplus (\mathbf{Z}/3 \mathbf{Z})^n$ occur as class groups of imaginary quadratic fields for only finitely many $n$.

The result above is not effective, because Brauer-Siegel is not effective. (The effective lower bounds on class groups of Goldfeld-Gross-Zagier are not strong enough to prove these results either.) However, one should be able to produce the complete list (for any $A$) using GRH, and then prove unconditionally that there are at most an explicit bounded number of exceptions. (I think this has been done in this case $ (\mathbf{Z}/2 \mathbf{Z})^n$, for example: look up idoneal numbers, e.g.: The missing Euler Idoneal numbers.)

** Watkins:**
Finally: Watkins' computation is impressive, in part because he smashed the previous cases
of the class number $\le N$ problem, which were only known for $N$ up to about $10$ or so.

** Extra:** Here's an email from Mark from 2008:

a search
shows that the following groups do not occur:

(Z/3)^3

(Z/2)^5

(Z/2)x(Z/3)^3

(Z/2)^6

(Z/4)x(Z/2)^4

(Z/3)^4

(Z/9)x(Z/3)^2

Only occurring once:

(Z/3)^2 d=-4027

(Z/2)^4 d=-5460

(Z/5)^2 appears twice d=-12451,-37363

(Z/7)^2 appears twice d=-63499,-118843

(Z/9)^2 appears thrice d=-134059,-298483,-430411

(Z/3)x(Z/2)^5 appears thrice d=-87780,-145860,-106260