The most important point to remembers, as explained in another answer, is that it is impossible to win by roads and settlements only. So you have to have some development, and it is not as much "switching" as "morphing" when you gradually increase the priority in getting the "development" resources over the "building" resources through placement of the new settlements, trade, and development cards play such as "Years of plenty" and "Monopoly". One tale-telling sign that you've been building for too long is when you say, "I place a settlement", turn in the four cards, and find that you have used all the five settlement pieces already. OOPS.
As everybody else said, the timing and degree of morphing really depends -- namely, on the map and the initial placement. You need to learn to recognize the strengths and weaknesses of the map, and the strengths and weaknesses of your initial position, which is a learnable skill (hint: add the dots). Typically, you would have "production" locations (the initial two, plus may be another one) that would have 8+ dots total on each of them, while the remaining locations will be "placeholders" that don't produce much, but you would have built them anyway for points, to block other players, for the useful trade ports or for transition from roads to ships if you play with ships.
If you keep playing the standard one big hex map of the basic Settlers, you will know all the strong and weak spots after ten plays. I build my own maps every time we play, and try to balance the resources off. Sometimes, though, you will just have a map which is scarce, say, in ore (by design or by chance), so in your initial placement you would want to get as close to the only ore-8 in play as possible. If you failed that, and you see that other people cut you off from it by building their initial settlements on the perimeter of that hex, you will need to change your strategy from the outset, and play your strong resources. Say if you have wood-6 and wood-9 in your initial settlements (either the map is very rich in wood, or other players got carried away placing around that ore-8), you would want to build towards the wood port and just trade whatever you need 2:1. If you do this quickly enough, you'd be able to successfully convert your "building" phase into the "development" phase.
On the other hand, if you were able to place one of your initial settlements on a three-way corner of ore, grain and wool with at least three dots on each, then you can simply play off that location (and win) to either accumulate the development cards, upgrade your settlements, or trade bricks with other players who would get caught in their building phase for too long. A huge advantage of this location is this sort of versatility, while concentrating on wood and bricks will only get you endless roads. (That's why I try to avoid such locations in my custom-built maps though.)