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).

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: