Normally, you say Cosa hai fatto? to ask other people what they did, also with an interrogative tone of voice.
Hai fatto cosa? is not used this way, but usually when the other person didn't correctly understand what you just did, or that person understood that, but he is startled.
[A] Sai che ho fatto? Ho gettato nell'immondizia la tua collezione di fumetti rari a cui tenevi tanto!
[B] Hai fatto cosa?
In this case you would say Hai fatto cosa? with a very angered tone.