How can I compare the van der Waals constant $a$ (the liquefication constant) for different compounds based on my knowledge of bonding in the compound?
Actually, as you indicated in the question, this comparison is not realistic since $a$ is unique to a particular compound/atom. As Chet Miller pointed out $a$ is depend on the each molecule/atom's critical pressure $(P_c)$ and temperature $(T_c)$ as:
$$a = \frac{27R^2T_c}{64P_C}$$
It is also depends on other factors such as the size, shape, mass, intermolecular forces, etc.
A general trend that I can see is a is proportional to molecular mass. Am I wrong to compare on the basis of intermolecular forces like hydrogen bonding, which is clearly very good in the water but the a value isn't so promising?
I'd say, yes! It is definitely proportional to molecular/atomic mass of the molecule/atom of interest. But it is true that it is also depends on specific types of molecules/atoms:

As shown in the plot of the noble gases, the slope of the plot is $0.0304$ ($1.74^\circ$ to the $x$-axis), the smallest of all compounds. That is expected since all noble gasses are believed to have no intermolecular (interatomic here) forces other than London forces (also they are mono-atomic and even those forces are minimal). I also included hydrogen gas here (which is the only bi-atomic molecule in the set) because it fits in without significant deviation. The biggest deviation is shown by neon, which is always like to be behave alone. Even with this hiccup, the relationship is almost perfect $(R^2 = 0.9907)$.
On the other hand, to compare with noble gases, I chose a second set of compounds, which included water and ammonia (considered to be having strong intermolecular interactions). I also included hydrogen gas hoping to have a cross-section between two lines. Even with vastly different compounds having mixed properties, $a$ and molar masses of this set have a good relationship $(R^2 = 0.9773)$. The most significant deviations are from benzene (probably due to $\pi$-$\pi$ interaction or $\pi$-stacking) and acetic acid (probably stay as a dimer in vapor state). The slope of the plot is $0.2564$ ($14.38^\circ$ to the $x$-axis), a significant increment from noble gasses as expected, but it is not the largest of all compounds I have so far studied in this regard (Nonetheless, the angle between two straight lines is $12.64^\circ$, a significant deviation):

The expectation was the slope of the plot with polar compounds to be the largest since this particular set of compounds believed to be having the strongest intermolecular (or interatomic) forces in addition to London forces.
Surprisingly, That credit goes to the group of compounds, mostly of which are hydrocarbons:

It is noteworthy to mention that 17 of 20 compounds included in the plot are hydrocarbons. The rest is alkyl primary amines, which are also capable of having strong inter-molecular interactions (e.g., interactions due to polarizability; see porphyrin's comment elsewhere). The slope of the plot of this specific set is $0.3106$ ($17.25^\circ$ to the $x$-axis). The data are in a good agreement $(R^2 = 0.9757)$. Only outliers are hexane, cyclopentene, and methylamine, but they are not off by much. Except for three amines, all other 17 compounds are alkanes, alkenes, and a alkyne, all of which are unable to make hydrogen-bonding. Thus, it is safe to suggest that the better influence on $a$ values are from mostly non-polar interactions among molecules, which are having higher polarizability would show the highest influence. I disagree with Ritam_Dasgupta's idea of comparison of water with molecules with similar molar masses. The plot with polar molecules including water $(MW = \pu{18.02 g mol-1})$ and ammonia $(MW = \pu{17.03 g mol-1})$ would disagree with that idea. For instance, water is much polar than ammonia and make stronger hydrogen-bonding (c.f., boiling points, $\pu{100 ^\circ C}$ vs $\pu{-33.3 ^\circ C}$), yet $a$ value of water and ammonia are $5.53$ and $4.23$, respectively with close proximity.