Formal:
* J'espère que vous avez passé un bon moment. (I hope you had a good time.) - This is the most formal option.
* J'espère que vous avez bien profité. (I hope you enjoyed yourself.) - This is also formal, but slightly less formal than the first option.
Informal:
* J'espère que tu t'es bien amusé. (I hope you had fun.) - This is the most common way to say it informally.
* J'espère que tu as bien rigolé. (I hope you laughed a lot.) - This is a more informal way to say it, implying that the person had a good time laughing.
More specific:
* J'espère que vous avez bien profité de la soirée. (I hope you enjoyed the party.) - This specifies the event.
* J'espère que vous avez bien apprécié le concert. (I hope you enjoyed the concert.) - This specifies the event.
You can also add a little extra to your phrase to make it more personal, like:
* J'espère que vous avez passé un bon moment avec nous. (I hope you had a good time with us.)
* J'espère que vous avez passé un bon moment, malgré le temps. (I hope you had a good time, despite the weather.)
Remember to choose the most appropriate phrase based on the context and your relationship with the person you're talking to.