This phrase means can mean "Have a good weekend!", "Have a good day!", etc. You can even use it when you don't know when you'll see someone again:
A: It was great meeting you. Take care.
B: OK, you too. Have a good one!
"Have a good one" sounds relaxed but polite. You can use it to say "goodbye" to someone who you don't know very well or have just met.