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 Archers. Knights use swords, while Archers use bows. (Archers don’t require arrows to shoot, unless you’ve completed the research in the University.) 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 (again, only if you’ve completed the research in the University).