For casual mod authors, creating a modifiable weapon is fairly simple.
Note, Weapon Mods have no effect in and of themselves- the only data they have is text description. They can be selected as 'mods' on a weapon's Mod Info tab. Weapon mod items, known in the GECK as Item Mods, are new items in Fallout: New Vegas roughly similar in behaviour to Misc items.