Zombies are undead, with non functional internal organs. They do not feel pain, so fire wont make them stop lumbering towards you. They will continue to walk around until the fire destroys their mobility - which could take upwards of 10 minutes depending on their level of decomp.
Lighting a zombie on fire only creates a mobile torch, lighting everything in his path on fire, potentially creating a burning inferno for you and your once-survivor friends.
Save your fire for the disposal of their re-dead corpses ... or, if you're secure in the stability of your building, perhaps as grenades on the mass of zombies on the street. But only with forethought and caution!!
Remember: The only thing worse then an undead hord trying to eat your brain is an undead horde trying to eat your brain WHILE THEY ARE ON FIRE!