Armed Peasants are the most basic unit, and the weakest unit, in the entire game. That's exactly why you can recruit them from the most basic rank of Freeman. Armed with only a pitchfork, Armed Peasants are useless when it comes to any real fighting. In some cases, even enemy workers can defeat them.
Armed Peasants do not require any weapons to be recruited and for this reason they can be used as a last resort if your Castle is about to fall. All you require is a very basic level of gold to recruit an Armed Peasant, along with a single recruit from the campfire. All ranged units in the game will kill Armed Peasants in a single shot.
If you're planning to use these units, try your best to avoid all ranged units. You can also use Armed Peasants to find traps by the enemy, or to activate War Hound cages nearby, thus taking damage instead of your troops giving them the vital time to kill the War Hounds via Archers or some other ranged unit.
Tip: Armed Peasants can be really useful for doing the work you don't want your actual army to do. For example- using them as a distraction instead of your real troops, so they take less damage. Treat them like cannon fodder, expect no less of them, and you won't be disappointed.