Manual:$wgInvalidUsernameCharacters

Details
Characters to prevent during new account creations.

The @ sign is prohibited by default, because MediaWiki uses it internally for users that have their account in another wiki (interwiki users).

If you allow the "@" in usernames, you should also set .

Otherwise you won't be able to give users with an "@" in the username different permissions.

This is used in a regular expression character class during registration (regex metacharacters like / are escaped).

Example
In case user names containing @, # and € should be prevented, the following setting is used: