I would say to whip almost always, at least early on. The only penalty is the stackable -1 happiness for 10 turns, so as long as I have a city with 3 or more population, I'll whip anything I can. Also try to whip for multiple population (30 hammers per whip, so if 31-60 hammers away 2 pop will be sacrificed but still only -1 happiness for 10 turns. Those numbeb is for normal speed, with 0% production bonus.)
The minus happiness stacks such that the duration is increased by 10 turns per whipping and -1 happiness per 10 turns left in the duration (plus 1).
Try to control each of your cities' populations to stay around 2 to 4 early on, you expand much more quickly and get a good feel for how useful the food sources are, the granary is, and when cities in the midgame should whip.
Just know that only half of your city's pop can be whipped at a time and that there is a 50% production penalty if you have zero turns invested into a project and another 50% production penalty for whipping world wonders. So chopping > whipping for world wonders, and wait at least 1 turn after starting something before whipping it.
Whip a lot in the early game, especially if your city is ever working tiles that haven't been improved yet.
I stop whipping so much when a city needs to raise its pop in order to work some strong tiles or if I want to run some city specialists. This usually isn't until ~6+ cities are set up and 500 BC is around. But even then, I really just raise the threshold from 2-5 pop per city to 3-7 pop. As you focus more on tech and less on army and expansion, whipping will be less prevalent until you finally got that war tech you were waiting on, then drafts/whips for dayzzz to go to war.
A good guide can be found here:
http://forums.civfanatics.com/showthread.php?t=193659
Also consider looking through NihilZero's comment in this thread:
http://forums.civfanatics.com/showthread.php?t=419635