Formal:
* J'espère que vous vous amusez bien. (This is the most formal and polite way to say it.)
Informal:
* J'espère que tu t'amuses bien. (This is used with friends or people you know well.)
* Je te souhaite de bien t'amuser. (This is another informal option that literally means "I wish you to have fun.")
More colloquial options:
* Amuse-toi bien! (This is a very common and informal way to say "Have fun!" and can be used on its own.)
* Passe un bon moment! (This means "Have a good time!" and is also very informal.)
The best way to choose the right phrase depends on your relationship with the person you are talking to.