To completely over-analyze:
Below a certain point, population is more helpful for tax revenues than market bonuses. This is because it takes a lot of population before the increase in taxes by adding a market is greater than the increase in taxes by adding another billion persons to tax plus the bonuses already in place. For example, let's say you are Federalist (+20 Economy), are mining an economy resource for another +5 Economy, and have the first market upgrade tech, which also gives +10 Economy. You have a world with 10 billion people at the cap and are considering whether a market or farm is best. Adding 4 billion persons from a basic farm would give you 4 * 1.35 * TaxRate additional credits, or 5.40 * TaxRate. Adding an Advanced Market Center (+15% economy) would give 10 * .15 * TaxRate additional credits, or 1.5 * TaxRate. Obviously adding more people is better for money here.
However, you also have to factor in how many morale buildings you will need to keep the additional population happy. At low population levels, it's still generally better to increase population - even at the cost of a morale center for each farm (Note that 2 markets in the above calculation is still worse than 1 farm + 1 morale center). I've been unable to determine whether approval penalties for population are linear or exponentional. If they are linear, you'd want to build farms until a certain population was reached (with morale centers along to keep people happy), then alternate between markets and farms/morale. If they are exponential, at some point it becomes much more advantageous to add markets, since it may well cost 3 or 4 morale centers just for the people added by one farm.
You may also want to consider two other factors:
1) Markets provide their bonus "out of the box" - as soon as it's built, you'll at least get something added to your tax revenues. Farms don't do anything by themselves, they just allow population growth to continue. Even if farms are better in the long run, you might want to build markets to get a short term bonus. Heck, if you want you can always tear them down later and build farms.
2) It seems like troop levels are related to population - might be worth emphasizing farms a bit more if the world is on a frontier that you feel might be invaded.