One code that circulated for the first game: FBE58T, entered to unlock Ra's al Ghul.
Input the code from the main menu's code entry option rather than during play. Codes in LEGO titles are entered in a dedicated screen and take effect immediately on the character roster, so there is no need to reload a save.
Character unlocks are the bulk of them. The game has a very large roster spanning heroes, villains and variants, and codes were one of several ways to add to it — the others being story completion and finding minikits.
Check that you are entering it in the correct game. LEGO Batman 2 and LEGO Batman 3 use entirely different code sets, and a code from one will simply be rejected by another. Codes are also often case-sensitive in these games, so type them exactly as listed rather than relying on autocorrect.