Guards are the protecting force for your colony. As long as you provide a Guard with a weapon, they will protect your colony day and night.
There are two types of Guards: Knights and Rangers. Knights use swords, while Rangers use bows. (Rangers don’t require arrows to shoot.) You can set the type of Guard in the Guard Tower or Barracks Tower GUI.
Guards will use armor when provided with some, and (if they’re a Knight) will use a shield as well.