Formal:
* 昨晚玩得很开心 (Zǎowǎn wán de hěn kāixīn) - This literally translates to "Last night played very happily". It's a general and polite way to say it.
Informal:
* 昨晚玩疯了 (Zǎowǎn wán fēng le) - This means "Last night played crazily". It implies having a lot of fun and perhaps a bit of wildness.
* 昨晚超嗨 (Zǎowǎn chāo hāi) - This means "Last night super high" and is a more casual way to say you had a great time.
For specific situations:
* 昨晚和朋友一起吃饭聊天,很开心 (Zǎowǎn hé péngyou yīqǐ chīfàn liáotiān, hěn kāixīn) - This means "Last night I had dinner and chatted with friends, it was very fun". This is specific to a dinner with friends.
* 昨晚看电影,很精彩 (Zǎowǎn kàn diànyǐng, hěn jīngcǎi) - This means "Last night I watched a movie, it was very exciting". This is specific to a movie experience.
You can choose the phrase that best fits the situation and your relationship with the person you're speaking to.