In a perfect world, you'd not pay the taxes and invest the funds as you earned them throughout the year. However, I know some family members who simply can't save if given the choice. Their mortgage and "forced" 401k savings are the only way they build assets: money in their hands is gone as quickly as it arrives.
As long as the tax refund actually turns into an investment (and not, say, into a vacation), what you're currently doing it's not really the worst thing in the world - it's just not optimal. If I were you, I'd adjust my witholding, get the extra cash, and track to see if I was actually saving the delta. If so, that's the way to go.
Are you already maxing your 401k and HSA? If not, those would be good, first options for that cash.