These two concepts are not mutually exclusive. You have constructed a false dichotomy. Both of these facts are true:
1. The electrons in the pi orbitals of the conjugated double bonds in the planar rings are hydrophobic and can "stack" on each other as shown in this drawing of a DNA helix where the bases are shown as planar rectangles:
!A model of a kinked DNA helix
2. The nitrogen and oxygen molecules (either in the rings, or as substituents on the rings) can participate in hydrogen bonds (H-bonds):
!H-bonds in Watson Crick base pairs
There are other examples of hydrophobicity and H-bonds co-existing. For example on the interior of proteins.