It's typically used when someone is going to do something that involves searching or finding something, often in a competitive or challenging environment. It could be used in situations like:
* A job seeker going on an interview: "Good luck with the interview! Happy hunting."
* A person going shopping for a specific item: "I hope you find what you're looking for! Happy hunting!"
* Someone going on a date: "Have fun! Happy hunting."
The origin of the phrase comes from the tradition of hunting, where success was often seen as a matter of luck.
It's a casual and friendly way to express well wishes and optimism for someone's success.