An earthquake during a fight sounds like a fun complication to me, but we can’t be relying on all sorts of coincidences. Our D&D must be rigorously realistic!
The obvious way to stage an earthquake fight – the way these things usually go down – is to have the PCs trying to stop a ritual.
In order to provide full scope for earthquake fun, the fight should be in a setting with lots of earthquake-destroyable scenery. Perhaps a Greek-style temple with lots of pillars. Let’s put a river through the temple too: water or lava, depending in the god!
After a turn or two, if the PCs haven’t killed the ritualist, the ground shakes – a fortitude attack that knocks people prone. A few turns later, the same thing happens, with a stronger fortitude attack and maybe some damage. If the PCs haven’t stopped the ritual by the third check, the whole battlefield changes.
When the major earthquake happens, suspend the battle and, ignoring the battlemat, run a skill challenge where people try to avoid being swallowed by rents in the earth, run to high ground, etc. When the skill challenge is done, whip out a new map – a post-earthquake map, complete with chasms, fallen pillars, a water- (or lava-) fall, and a few pieces of unbroken ground. Depending on how everyone did, they’re at various places on the battlefield: hanging from exposed roots in a chasm, trapped under a pillar, or standing on one of the untouched areas of ground.