Who are you?
The above is a question. It employs an inverted structure so that the listener knows it's a question. By "inverted structure," I mean that it places the primary subject of the noun "are" after the verb. Uninverted, it would be: "You are who?" "Who" appears in the question—no matter how it's stated—as a second subject, as part of the predicate, specifically the predicate nominative.
who you are
The above is a clause, always appearing as all or part of a noun clause. As such, it only appears as part of a larger sentence, for example:
- It depends on who you are.
- I don't know who you are anymore!
- You want to know who you are? Who you are is the love of my life.
- Who you are to everyone else doesn't matter to me because it's not who you are to me.