To build the weapon workshop you first need 22 dwellers, 1200 caps, and space to build a 3-wide room. The room can hold up to 6 dwellers preferably with higher-than-normal agility stats to decrease the time it takes to craft each weapon. The time it takes to craft a weapon also depends on the stats of it. Better weapons mean higher craft times. You can however use nuka-colas to speed this up. To craft a weapon you need the recipe for it and the correct amount of different junk items. You can obtain more crafting recipes through exploration of the wasteland, quests, raiders attacks, and even the occasional deathclaw.
If you need any additional explanation: