You don't strictly need to play Batman: Arkham Asylum before Arkham City, but it's recommended. Asylum contains story pieces that tie into the sequel and introduces some brand-new characters, even for those familiar with Batman lore.
That said, Arkham City's story stands on its own, so you could jump straight in without much confusion. If you're debating whether to play both, just play both, ideally in chronological order. It's not a necessity, though, and you won't risk major spoilers beyond the previous game's ending.