They didn't know for sure. The town had recently been the subject of orc attacks led by a hobgoblin (homebrew PC race), and tensions were running high. When the PC's entered town, the hobgoblin in the party was accused of it by the mayor's widow. The sheriff took the group to his office for questioning but released them on their own recog. While investigating the attacks, the PC's became suspsicious of the sheriff and his men becuase they were missing at unusual times.
This group of players is typically very paranoid, so they followed one of the deputies when he left to travel to the "lair" outside town. When the arrived, they saw the sheriff and some of his deputies speaking with wererats in their hybrid form. The made a listening check and discovered that the conversation was a back and forth argument with the "wererat" group wanting to leave town, and the sheriff's group wanting to stay. Before, anything else could be gleaned, they formulated a battle plan and dove in to battle.
So, I'd say it was a combination of the "All wererats are evil" mentality and some purposefully vague information which they didn't take the time to investigate.