Immediately to begin with. Like right away. The first thing you do in fact. Let me explain......
I tend to do it in three stages. Take into account that most of my embarks are in sinister/terrifying terrain, so early wildlife attacks are quite regular. The first one is straight away, by taking the minerals/fuel to make up 6 bronze weapons. Each weapon comes out to 15 embark points, which is pretty cheap considering they're the second best cutting weapons aside from candy. I make a smelter/anvil immediately and make up a few weapons with my skilled weapon-smith. I usually make up 3 picks and 3 axes to help out the fort early on, plus they're also quite good limb-chopping weapons and fairly good for larger creatures. I also bring along 6 light wood for shields for my dwarfs, which are made by my carpenter even before beds are thought of. This gives me a good fall-back option at the start where I just squad up dwarfs as necessary (and take the happiness hit) to protect the early fort. All useless immigrants then get permanently rotated into the squad and danger-roomed/squad trained. I find the bronze weapons/wooden shields are good enough that it doesn't matter if they become attached to them.
I also find that it's worth using a few useless dwarfs as miners until it's their highest skill, because if they mood you get a pretty awesome fighter for the squad. And a miner for cotton candy.
The next stage is decision making time. Really it's just a matter of asking -: Bronze, steel or candy - magma or not? Any of these three will get you through the majority of ambushes, it depends on the resources available. Also make up 3-6 copper/silver hammers as your anti-armour option. I start pumping out armour, more axes and a few spears and hammers as soon as possible, enough to equip 5 three man squads with full armour. This usually gives you 3 axes, pick, hammer, spear dwarfs and then a weapon of choice squad. Within the first year or so you'll have the weapons and armour required to defend your fort nearly all game, with danger-room trained dwarfs toting them. Try and make this decision by the end of the first year or earlier, and make up some full armour sets. It doesn't matter if they're not exceptional quality, any quality bronze/steel/candy armour is ALWAYS better than none (imho).
After that, the final stage is just training up armour/weapon smiths to insanely high level and upgrading the equipment of your squads. And getting more squads. And making squads bigger. And putting every crappy weapon in traps all over the map. You're done by now, plan a hell expedition or a war against all other civilised races........... Or both at once.