Formal:
* O que aconteceu? (What happened?)
* O que se passou? (What happened?)
Informal:
* O que foi? (What was it?)
* O que rolou? (What went down?) - This is more slang and means something like "what happened, what went on"
* O que houve? (What happened?) - More common in European Portuguese
In addition to these, you can also use:
* Pode me explicar o que aconteceu? (Can you explain what happened?)
* Diga-me o que aconteceu. (Tell me what happened.)
The best option will depend on the situation and your relationship with the person you are talking to.