I think everyone effectively answered your question, but I just wanted to throw in a little piece of info of my own.
Even if you haven't visited the wiki, that user can easily find your username regardless with a very simple and straightforward method: editing the url search.
What I mean is this
1. Take any user page http://community.wikia.com/wiki/User:Fobarimperius
2. Replace the username with the target username http://community.wikia.com/wiki/User:Stryzzar
3. Change the wiki destination so you go to that wiki and that user profile even if you've never visted it like so http://world-war-2.wikia.com/wiki/User:Stryzzar (leads to a wiki all about World War II). You'll note that despite having never visted this wiki, your username is already available to see on the wiki, as would be mine despite myself also never having contributed to the wiki in question.
It's very easy but it DOES have to be done deliberately, so there's a very good chance this user singled you out specifically, however what that reason is I couldn't say beyond standard assumption.
Also, this would have been the only way he could pull up your profile because, using the World War 2 wiki as an example, if you search in the WWII wiki search bar "User:Stryzzar" you won't get a response because you're not actually logged anywhere on the wiki, nor will googling your username and that wiki get a response, you would have to do it the above way to pull up your username profile on a wiki you've never visted. You could also do this to a wiki you HAVE visited as well, but I'm just focusing on how he found you to start with..
@ Tupka217
That should be an official term now. I'm not kidding.