Formal:
* Como é que me conhece? - This is the most direct and formal way to say it.
* De que forma me conhece? - This is also formal and emphasizes the *way* you know the person.
Informal:
* Como você me conhece? - This is the most common and casual way to say it.
* De onde você me conhece? - This literally means "where do you know me from?" and is a good way to ask if the person knows you from a specific place or event.
* Como sabe quem eu sou? - This is a more informal and direct way to say "How do you know who I am?"
Adding Emphasis:
You can add emphasis to any of these phrases by adding a word like "bem" (well) or "realmente" (really) at the beginning, for example:
* Bem, como você me conhece?
* Realmente, como é que me conhece?
It's important to consider your relationship with the person you are speaking to when choosing the appropriate phrase.