Plenty of systems have something for that, often with a variety of options.
A bookish Exalted character might roll Intelligence + Lore to remember having learned about the weakness to fire before. Or maybe Intelligence + Occult if the weakness is supernatural in nature. A combat-oriented character might roll Wits + War to deduce that fire is needed based on the knowledge of old battle reports involving trolls. Maybe even something involving Survival if they're familiar with a region trolls can appear in.
A game with a flexible skill system has a lot of room for such things.