"Have a nice day" can be a lovely reply or opening however, note that it can be over done and is a standard commercial phrase drilled into staff at fast food outlets. So it can be seen as a bit of a joke.
So, from a friend or a person you know it is fine and you should respond with any of the usual, hi, thanks, you too, so nice thanks, thank you, etc. with a warm smile.
In a shopping environment it is a little harder, you can use the above but recognise you are being manipulated. I tend to be pleasant in that situation but less effusive.
Best not to respond with "Have a nice day" as well.
There is also the meaningless "you're welcome" which you can lob in and is really just the translation of an Italian word "prego" and is just a common term that means little but satisfies the human to human contact thing.