My understanding is that city defection is based on:
Ethnicity of the citizens
Overall culture rating of the two civs
Individual culture rating of the city (and the nearest enemy city?)
Relative distances to the Capitol cities of the civs
Happiness (if it's in disorder, it's more likely to defect).
Possible solutions to captured cities defecting (other than razing and rebuilding, which is what I tend to do):
1) Starve the hell out of it while it has resistors... after it's under your control, any NEW citizens will be of your nationality, and thus the city will be less likely to defect.
2) Rushbuild cultural buildings (temple, library, cathedral, university, colliseum - in that order). If you're a despot,
3) Move your palace closer to the front... although this opens up other problems.
4) I'm not sure of this one, but it appeared to help me in one game: the Forbidden City acts as a palace w/respect to corruption, but I think that it may also help with city defection.
5) Prepare for the possible loss of the city (ok, this isn't a strategy to avoid the loss, but hey). I usually only put 2-3 units MAX into a new conquered town. Firaxis has said that the suppression of resistors works at about a 1-1 ratio of units to resistors. If you have 3 resistors, 10 units isn't going to help.
6) Bombard the city down to a low population before taking it. Sure, this takes more time, but it will also save casualties among your offensive units that eventually attack, as the defensive bonus for the AI's units will be reduced (smaller city) and they will be beat up.
I hope this helps.
-Arrian