It's generally a bad idea to found cities directly on a resource, since you will lose the benefits you get from building the improvement on it. But sometimes you have to do it to gain a resource elsewhere and I believe that it's sometimes preferrable. This guide will show when you get a bonus from the resource in the square you found the city. I will only use the resources you see from the start, since those are the relevant ones.
Food resources (Wheat, Rice, Corn, Cow, Pig, Sugar, Banana, Deer, Sheep) gives a bonus when located on flat grasslands (forests are irrelevant since they're removed upon the founding of the city).
Production resources (Stone, Marble, Ivory) gives a bonus when located on a plains and/or hill. Yes, this means a city on a plains hill with a production resource gets 3 hammers in it's city square.
Commerce resources (Gems, Fur, Dyes, Gold, Incense, Wine, Silk, Silver, Spice) gets a bonus when located next to a river.
So when is it worth founding a city on a resource? Well, what you lose is the bonus you get from the improvement, so lets list them here:
Pigs +3F
Banana +2F
Corn +2F (+3F if irrigated)
Deer +2F (+1H if in forest, since camps don't remove forest while cities do)
Wheat +2F (+3F if irrigated)
Rice +1F (+2F if irrigated)
Cow +1F +2H
Sheep +2F +1C
Spices +1F +2C
Sugar +1F +1C
Wine +1F +2C
Now, since food is very hard to come by it's generally a bad idea to build cities on square which will produce extra food. All of these are superior to farms.
Ivory +1H +1C
Marble +1H +2C
Silver +1H +4C
Gems +1H +5C
Gold +1H +6C
Stone +2H
Horse +2H +1C
Copper +3H
Iron +3H
Production is the second hardest commodity to come by. One must compare with mines which produce +2H or cottages that gives +1H+7C at best. Now things are getting interesting. A stone square does not give anything more than a mine, so you might as well build your city on it if you have enough hills. The others all gives less than a Town under Universal Suffrage and Free Speech. Now you have to consider the time it takes for cottages to reach Town status and if you will be using Universal Suffrage at all, but in many cases it might be worth placing a city on it. Iron, Copper and Horses should be left alone, however.
Incence +5C
Dyes +4C
Fur +3C
Silk +3C
Commerce is very easy to come by. A cottage gives 1-7C and an additional hammer under Universal Suffrage. This means that a square with one of these resources is actually a waste, assuming you want to be able to use the resource. Planting a city on it is about as good as planting on tundra or desert. If you're lucky you can plant a city on tundra or desert with one of these (yes, you sometimes find desert next to river that isn't flood plains). Sure, you get the extra commerce instantaneous which can be a huge boost early, but since three of the four needs Calendar that point is fairly moot.
Conclusion:
The general consesus to never found a city on a resource that appears to be true in these forums has serious flaws. While food resources are valuable, hammer and most of all commerce resources are not. Quite the opposite, they're in the way. Finding a nice Silk square next to a river should be something to aim for, to get that extra boost early. Or why not a juicy Sugar square? You lose a commerce, but you wouldn't be able to get it before Calendar anyway and an extra food early on is a huge deal. Plus you get the extra benefit of an unpillagable resource.
Food resources (Wheat, Rice, Corn, Cow, Pig, Sugar, Banana, Deer, Sheep) gives a bonus when located on flat grasslands (forests are irrelevant since they're removed upon the founding of the city).
Production resources (Stone, Marble, Ivory) gives a bonus when located on a plains and/or hill. Yes, this means a city on a plains hill with a production resource gets 3 hammers in it's city square.
Commerce resources (Gems, Fur, Dyes, Gold, Incense, Wine, Silk, Silver, Spice) gets a bonus when located next to a river.
So when is it worth founding a city on a resource? Well, what you lose is the bonus you get from the improvement, so lets list them here:
Pigs +3F
Banana +2F
Corn +2F (+3F if irrigated)
Deer +2F (+1H if in forest, since camps don't remove forest while cities do)
Wheat +2F (+3F if irrigated)
Rice +1F (+2F if irrigated)
Cow +1F +2H
Sheep +2F +1C
Spices +1F +2C
Sugar +1F +1C
Wine +1F +2C
Now, since food is very hard to come by it's generally a bad idea to build cities on square which will produce extra food. All of these are superior to farms.
Ivory +1H +1C
Marble +1H +2C
Silver +1H +4C
Gems +1H +5C
Gold +1H +6C
Stone +2H
Horse +2H +1C
Copper +3H
Iron +3H
Production is the second hardest commodity to come by. One must compare with mines which produce +2H or cottages that gives +1H+7C at best. Now things are getting interesting. A stone square does not give anything more than a mine, so you might as well build your city on it if you have enough hills. The others all gives less than a Town under Universal Suffrage and Free Speech. Now you have to consider the time it takes for cottages to reach Town status and if you will be using Universal Suffrage at all, but in many cases it might be worth placing a city on it. Iron, Copper and Horses should be left alone, however.
Incence +5C
Dyes +4C
Fur +3C
Silk +3C
Commerce is very easy to come by. A cottage gives 1-7C and an additional hammer under Universal Suffrage. This means that a square with one of these resources is actually a waste, assuming you want to be able to use the resource. Planting a city on it is about as good as planting on tundra or desert. If you're lucky you can plant a city on tundra or desert with one of these (yes, you sometimes find desert next to river that isn't flood plains). Sure, you get the extra commerce instantaneous which can be a huge boost early, but since three of the four needs Calendar that point is fairly moot.
Conclusion:
The general consesus to never found a city on a resource that appears to be true in these forums has serious flaws. While food resources are valuable, hammer and most of all commerce resources are not. Quite the opposite, they're in the way. Finding a nice Silk square next to a river should be something to aim for, to get that extra boost early. Or why not a juicy Sugar square? You lose a commerce, but you wouldn't be able to get it before Calendar anyway and an extra food early on is a huge deal. Plus you get the extra benefit of an unpillagable resource.