First, you can find information that is helpful in the DMG on page 246.
Stone has a AC of 17, Iron/Steel 16, and Wood is 15. So that gives us a start.
From there we look at Object HP and we see that a Large object (10x10) has a HP pool of Fragile 1d10 to Resilient 5d10.
We assume a basic house of Resilient quality, made of wood, we get somewhere in the ballpark of 27hp per wall and half the roof for a total of roughly 162 hp. This would be a tiny house, 10x10x10, but it's a starting point to work from.
If we look at something like a tavern, we look at 30x20x20, giving us easily 270 hp.
The DMG has some guidelines for the hp an object might have but for things like buildings or castles, the things players would probably like to tear down with Earthquake, it's more up to the DM. The DMG does mention Damage Thresholds which is how much damage of an appropriate type an object or a structure has to take in a single attack for it to take any damage at all but for the most part this is designated by the DM. Usually logic should come into play here . A sword hitting a castle wall shouldn't really do much, nor fire on stone. But a sustained earthquake on that castle wall? Eventually that thing is going to come down or at least break in places.