No, it doesn't have to be red. It is recommended to repair when the condition is below 25 %.
To repair you have to right-click the weapon in your inventory and select repair. Of course, you need a Weapon Repair Kit in your inventory, too.
To raise the weaponry skill (like every other skill that depends on crafting) you have to craft items. In this case, you have to craft weapons that aren't greyed out (white or green color in the recipe menu).