I've seen on a lot of sites it says you have to take a weapon that you want to apply a mod, to a regular workbench. This is false. You mod weapons in your pipboy anyplace at anytime if you have the mod. Simply click over the weapon you have the mod for in your pipboy, and there will be an option on the right hand side of the menu that says "Mod." Click that and you're all set.
It took me a long time to figure this out because of false info on the interwebz.