This guide will try to give you a sense of what's important when building up a city. I will start by explaining why to prioritize some buildings and then I will explain how priorities might very in different situations.
When you start a new city, you should make sure to get your farming villages as soon as possible. If you're a very active player (who makes 5-minute demands for at least three hours every day), they will be your main source of income. Getting six of the eight farming villages on your island is quite easy. They get harder to take every time your capture a new one (see details in the Grepolis farming guide, so don't conquer your seventh farming village before you have a big city. To take the first four farming villages, simply get some slingers. They will easily defeat what is defending the farming villages. There will be 60 swordsmen defending the fifth farming village, so build some hoplites to defeat the fifth farming village as well. The sixth farming village can be defeated with 60 slingers (although, if you have them, using horsemen is optimal, and you need as few as 15), but you will need at least 150 slingers to defeat the seventh farming village. Always capture the farming villages with the highest levels first. Other players on your island have separate farming villages (meaning they can own all eight farming villages even though you do the same), so when you do with the farming villages has no effect on other players on your island, except if you expand them (then others on the island will benefit, since the levels are same for all players).
While you are online, you demand resources from your farming villages. Initially, you will have the choice of four different demands, and when you research booty, you will have eight different choices:
The example here comes from a farming village that is level 5. Every time you have some excess resources, it would be wise to use them to expand your farming villages since this will gain you more resources in the long run. If you demand 36 of each resource, you have to wait five minutes before you can demand from that village again, but if you demand 555 of each resources, you will have to wait 480 minutes (eight hours). One very important thing to note is the lower option you choose, the more resources per minute you will get. This makes a huge difference. Here, if I choose to get 36 of each resource, I will get 7,2 of each resources per minute. Meanwhile if I choose, I will only get 1,15 of each resources per minute. So, this system greatly favours people who spend a lot of time on demanding resources from the farming villages. If you are able to stay online for a while and demand resources every five minutes, this will earn you much more resources than if you only demand every eight hours. But when you go to sleep, of course, the best option is the eight hours, since you will not be demanding resources while you sleep (hopefully ).
Here is an illustration of the difference in resources if you were to use the different demand-options for a full 24 hours (with level 5 farming village used as an example):
Demand every 5 minutes: 10.368 of each resource per farming village
Demand every 10 minutes: 8.640 of each resource per farming village
Demand every 20 minutes: 5.616 of each resource per farming village
Demand every 40 minutes: 4.716 of each resource per farming village
Demand every 90 minutes: 2.720 of each resource per farming village
Demand every 180 minutes: 2.264 of each resource per farming village
Demand every 240 minutes: 1.998 of each resource per farming village
Demand every 480 minutes: 1.665 of each resource per farming village
Keep in mind that you can also select the loot-option for double the resources and a decrease in the mood of your farming village. Just be careful; once the mood of your farming village drops below 80% (or 64% if you have researched diplomacy), your farming village will revolt if you loot. So, you will lose it and have to capture it back. However, if I'm going to sleep and I loot the farming village causing the mood to decrease by 96%, this does not mean that I lose the farming village. It simply means that the mood will be at 4%, and I should not loot the farming villages before the mood goes to a safe level again (but demanding resources is still fine). Generally I don't loot the farming village to a mood below 80% as this will make me unable to trade with them. If you loot, you should use the 20-minute option where possible as it has the higher ratio of resources per mood percentage. This means that if you don't have too much time to loot, you might as well use the 20-minute option. Otherwise, using the 5-minute option brings you slightly less resources per mood, but will allow you to loot quicker, meaning you can make demands to the farming village afterwards.
A good reason to get market level five early on is that you can trade with farming villages at a really good ratio. The max you can trade with any farming village at a time is 2.000 resources. However, the starting ratio is always 1:1.25, which means that for your 2.000 resources, you get 2.500 back. Once you've traded with a farm, the ratio gets worse, so you have to wait a while until you can trade at the best ratio again. Each farming village can only make a specific trade - wood for stone, for instance. However, if you can manage to plan ahead and balance your resources, trading with farming villages is an easy way to get resources. If you have six farming villages, you just need to trade once with them all to earn 3.000 resources.
If you max out all your buildings, they will take up 1132 of your maximum 3500 population. The less free population, the small your offensive or defensive army will have to be. And since this game always favours advantage in numbers, it's a good idea to not waste any population that you don't need, allowing you get to your armies as big as possible. If you stick to the most useful levels of your buildings, they will only take up around 900 population. There are certain buildings that you might not want to max out:
Maximum level: 30
Recommended level: 10 (defensive cities: 5)
Reason: People who attack really often might want barracks level 30, but otherwise it really isn't necessary. The difference between level 1 and level 30 is no more than a 30% increase in production speed. Barracks level 15 is required for chariots, level 10 for hosemen, but defensive cities won't need either, and can stick with level 5.
Maximum level: 30
Recommended level 5 (conquest cities: 20)
Reason: If you have naval cities, it might be worthwhile to build harbor up to level 30 for quick rebuilding if you have several matured cities and never run out of resources to build. But otherwise, it's not really necessary to build harbor past level 5, the level which is required to be able to build Therman baths. However, you need level 20 harbor to be able to build colony ships. Some will want to be able to do so in all their cities, while others settle for a few cities in strategic positions.
Maximum level: 25
Recommended level: 15
Reason: At level 15, temple gives you 7.8 favor per hour. If you get to level 25, you can get 10 favor per hour. This difference does not really justfiy using 50 more population, especially once you have more cities, where favor production is not as effective when more cities worship the same god.
Maximum level: 30
Recommended level: 10
Reason: You only need market place level 10 to be albe to trade with other islands. Having market place level 30 gives you more flexibility when you have many cities running full with resources, but generally isn't necessary. Often you will be able to do with level 10 just fine.