From Szabo'sSzabó's delightfully understated response (pdf) to receiving the Veblen prize:
The joint work with Peter Ozsváth which is noted here grew out of our attempts to understand Seiberg-WittenSeiberg–Witten moduli spaces over three-manifolds where the metric degenerates along a surface. This led to the construction of Heegaard Floer homology that involved both topological tools, such as Heegaard diagrams, and tools from symplectic geometry, such as holomorphic disks with Lagrangian boundary constraints. The time spent on investigating Heegaard Floer homology and its relationship with problems in low-dimensional topology was rather interesting.
Of course, if one believes that Heegaard Floer homology is somehow the limit of monopole Floer homology as one degenerates the metric in some way that depends on the Heegaard diagram, then the independence of Heegaard Floer homology from the Heegaard diagram would fall out from the metric-independence of monopole Floer homology. Unfortunately, I can't seem to find references that give any sort of precise picture of how OzsvathOzsváth and SzaboSzabó came to think that this should be the case (though it might have been a baby analogue of the picture in this paperlink broken (pdf) by Yi-Jen LeeYi-Jen Lee, written a few years later).
It perhaps bears mentioning that Heegaard Floer homology wasn't the first invariant that OzsvathOzsváth and SzaboSzabó constructed based on thinking about the interaction of the Seiberg-Witten equations with a Heegaard diagram--thesediagram—see papersThe Theta Divisor and Three-Manifold Invariants and The theta divisor and the Casson–Walker invariant, which extract an invariant from the theta-divisor of the Heegaard surface, appear to have been based on thinking about what happens to the Seiberg-WittenSeiberg–Witten equations when one has a neck Sx[-T,T]$S\times [-T,T]$ (S$S$ is the Heegaard surface) with the metric on S$S$ at t=-T$t=-T$ itself having long cylinders over the compressing circles for one handlebody, while the metric on S$S$ at t=T$t=T$ has long cylinders over the compressing circles for the other handlebody.