Formal:
* Passer un bon moment: This is the most literal translation and is suitable for formal situations.
* S'amuser bien: This means "to have fun" and is also suitable for formal situations.
Informal:
* S'éclater: This is a more informal and playful way to say "have a good time." It implies having a lot of fun.
* Bien s'amuser: This is a more casual way to say "have a good time."
You can also use a more specific phrase depending on the situation:
* Profiter de votre soirée: Enjoy your evening!
* Profiter de votre voyage: Enjoy your trip!
* Bonnes vacances! Have a good vacation!
* Amusez-vous bien! Have fun! (This is a versatile phrase suitable for most situations)
The best way to choose the right phrase is to consider the context and your relationship with the person you're speaking to.