Well it's not what I originally thought, there is a setting in advanced settings called messaging. If you have turned that off trying to make this dissapear you might want to turn it back on, a lot of tasks/alerts depend on it (program messages for example). To make that link dissapear you would have to remove the permissions below from the roles you want it hidden for.
moodle/user:editownmessageprofile
moodle/user:editmessageprofile
Cheers
David