How to build a settler factory
Each starting location is different and consequently the optimal way to get the settler factory up and running wiill be different as well. The best players work out every move in advance.
Here is an example taken from the game of one of the top teams in SGOTM-9. In a friendly game, it is not necessary to go that far. For now, maybe it will be better just to talk some general pointers.
Recognise the possiblity of a settler factory
Anytime, you have the possibility of 3 surplus food at a site (5 total), you should be on the lookout for a factory. This particular location actually has four additional (two from the wheat and one from each of the FPs). Four additional food is often useful for the general health of a civ. However, the subject here is settler factories and it is rarely required for the proper functioning of a factory.
The next question is whether the location also has enough shields. While there are other types of factories, the vast majority are of the same type as the one in Bamspeedy's excellent
Diety Settlers article.
This type of factory requires 5 food at all times. It must have 6 uncorrupted shields at when size x (where x is somewhere between 3 and 5), and 7 shields at size x + 1. It also requires an additional 2s tile to be available on growth. If x is 5, the city must be on a river or lake because otherwise the city will refuse to grow and use the 2s tile.
This games shows us another example of this type. We can generate the necessary 3 additional food by irrigating and using one FP and the wheat. Unfortunately this gives no shields whatsoever. They will have to come from elsewhere. One comes from the city core, two each from a pair of mined BGs and the final one from another BG. That makes the required six. We have the necessary 2s tile for use on growth - a forest. We also have yet another BG which gives us the 1s2f tile need for use at size x+1.
Counting up, we have 1FP, 1 wheat, 2 mined BGs and 1BG at size x. There is 1FP, 1 wheat, 2 mined BGs and 2BGs at size x+1. x therefore equals 5. In the community lingo this is called a 5-7 factory because it cycles up from size 5 to size 7 at which time it falls back to size 5.
You should be able to recognise this type of factory almost automatically. Remember the required conditions: 5 food, 6 shields at size x, 7 shields at size x + 1, an additional 2s tile and a river or lake if x = 5.
Decide which tiles need to be worked.
This location is one of the easiest to develop that I have ever seen. In order to get the factory up and running, only four tiles have to be developed: one FP, the wheat, and two BGs. And we have vanilla industrious workers as well!
Later on we might consider switching some tiles around. For example, our 1s2f tile might become a river grass for the extra commerce. It is not desirable to waste valuable squares like BGs and FPs so they should later be given over to other cities to work. This is one of many reasons to put cities fairly close together - so that valuable squares are not wasted.
However, getting the settler factory up and running takes precedence over everything- and I mean everything. It takes precedence over military. It takes precedence over exploration. It takes precedence over future city growth. Everything. It takes precedence over worker efficiency too. If you have to skip roading a square to get everything done in time, do it.
In this case we, we will use all four BGs at the beginning plus the wheat and the southern FP (why that one?). Later, two of the BGs can be traded for regular grass or plains.
Know the game mechanics
We have been talking about how the game counts shields from a tile when a city grows to the next size (although not food, curiously). Well the same thing applies to improvements. If irrigation is about finish on a tile, the improvement will be counted. So if you have irrigated the wheat for one for one turn (three turns for a non-industrious civ), the game is lying when it says the tile is worth +1 food. It actually is worth +2 and that is what will be credited to you on the inter-turn. The same thing applies to mining. That one additional food or shield could be critical.
Decide the order in which the tiles need to be developed.
In general, the BGs come first, especially if you don't have a 2f-2s tile (forest deer, for example) from the beginning. This is because you need productive power to build that granary, which is very expensive at this point in the game. Once you have the granary and the food, it won't take long to get up to size.
For example, consider the case where the granary could be built before the town grows to size three. In this case, it takes nineteen long turns to get the granary up (as SimpleMonkey points out, it should be completed on the turn before growth) and only five more to get all the way from size two to size five! Even if you could use a +1 f tile all the way from the beginning of the game, that would still be 13 turns before the granary vs. five turns afterward. And this is for a 5-7 factory. For a 3-5, the difference is 13 to 1! In short, money for the granary is always the most important thing.
Most (but not all) settler factories have one tile which gives +1f immediately and +2f after irrigation plus another which adds another food. This is one example. The wheat gives us two food and the fp gives one. Getting the +2f tile up to speed is also important. When working this tile, we can grow in 5 turns instead of 7 before the granary is built and 3 turns instead of 4 afterwards.
The balance between the BGs and the +2f tile is delicate and each case is different. Often you will want to use the BGs until the factory reaches size two, switching one to the +2f at some point while the factory is at size 2 or 3. If the +2f tile is more powerful, like a grass cow, it will move up importance relative to the BGs. However, the gain from developing +2f tile is always small, at best a turn or two and usually is nothing at all. Mining BGs will get you closer to that granary and, as we have already seen, the granary is priority 1. You won't go far wrong if you simply follow the rule to get the BGs first and the food afterwards.
After the BGs and the +2f tile comes +1 food tile. This gets us from growth in three down to growth in two. While it is almost always less important to get going than the +2f tile, it may take precedence over at least one of the BGs. This is because BGs no longer serve any purpose after the granary is completed until the factory is up to size while the +1f tile helps speed up growth. However, the BGs better be very close to completion when we start to use the +1f tile because otherwise the factory will grow out of control.
The final tile to develop is the 1s2f one. It won't be needed at all until size x+1 and it should always be improved last. The only possible reason to do it earlier is worker efficiency. For example, you might put a road on it to get to another more important tile. In our case, this tile is ready for use from the get-go so this is not a consideration.
This implies that Bucephalus' start, while good, is non-optimal because the next tile he has to work is the FP and he can't get there in one step from where he is. Furthermore, the worker should be heading towards the cow at the end in order to start improving tiles for the next city. This is the best tile on the map and improving it should be our next priority after the settler factory.
Forest chops
Chopping a forest can often help get the granary up faster and should usually be considered. This is particularly true in Conquests where a chop only takes 4 turns. This is Vanilla so it's much more expensive. However, it's only five turns with an industrious civ so maybe... Nope we only have one and we need it for the factory to work properly, so it's absolutely out of the question.
Additional worker
Sometimes a second worker speeds up development of a factory. However, in this case, we only have to develop 4 tiles and our worker runs on steroids. It's hard to see why we would need it.
Should a second worker be required, an additional question arises. Should he be produced before the granary or after? The first gets more production in, which helps to get the granary up faster. It wastes food, though, because the worker costs twenty food before the granary and only ten afterwards.
In general, the answer to this question depends on whether you have excess food or excess shields. Use up whatever you have more of. In a food-rich location, build the worker first. For example, if your factory will turn around an FP wheat, get the worker out to mine those BGs. If it turns around a grass deer, get the granary up. You already have a good shield producer. Get a BG mined while building the granary, switch production to it, then chop the forest over the deer.
Putting it all together
I haven't crunched the numbers but my intuition tells me that the optimal sequence for tile development is southernBG - wheat - FP - riverBG - easternBG. This sequence wastes no worker moves and leaves him heading in the right direction at the end. The idea that the southern BG should be worked before the river BG is far from intuitive and only planning out the plays in advance can lead to the right conclusion.
However, it is not difficult at all to figure out if the right questions are asked up front. What tiles need to be developed and where do we want the worker(s) to be when everything is done? What is the most efficient way to reach this objective? The optimal sequence simply pops out.
However, there is another question which is even important - does this sequence get the granary finished when we want do to be?
OK. Time for some higher math.
Objective: get the granary up before we reach size three, at which point the FP should be ready for use. Alternately, rapidly reach size four through use of lots of food (read iWheat). Second BG must be mined before the capital reaches size five.
Intuitive sequence tile development times:
sBG: 6 turns (move, mine, road)
wheat: 5 turns (move, irr, road)
FP: 5 turns (move, irr, road)
rBG: 3 turns (move, mine)
Total: 19 turns
Note that the riverBG is only 3 turns because the factory is functional at this point. We will certainly continue through with the road afterwards. Then it's on to the eastern BG and the cow!
Nineteen turns. So the whole thing could be done exactly when the city is about to grow to size three.

It might be a more optimal to grow a bit faster while building the granary though.
So let's count the shields we need to build that granary. The city works the riverBG for three turns and then switches to the southernBG just before the mine is about to complete. 60 - 3*2 -6*3 = 36 shields left to go when the city is about to grow. At this point we add back the river BG, giving us four shields per turn. 36 / 4 = 9. Granary built and 16 food in the bin. A perfect fit! Switch to the iWheat on the next turn and up we go! Two warriors can be built while the factory is getting up to size. Total time: 23 turns.
I suspect that this sequence is not perfect. It might be possible to shave off a turn and/or get a warrior out before the granary by judicious use of the wheat. However, it is good enough for anything other than the most serious game. Most importantly, none of the reasoning nor the math is complicated.
The only thing I'd be worried about is that the game might decide that the irrigated wheat is such a good tile that it would place the new citizen on that tile instead of the river BG when growing from size1 to 2. This can be solved by a little trick: road the wheat. Then move to the FP and improve that tile before finally irrigating the wheat. This will encourage it to use river BG instead of the wheat.