If my home state of California taxes the gains in HSA, should I use tax-efficient investments (for example Muni bonds), or should I assume that the market arbitrage on the taxable accounts so using corporate bonds should be a net bonus over the Muni (by amount of Federal taxes). How does my tax bracket impact this?
There are currently 3 states that do not recognize the HSA: Alabama, California, and New Jersey. (Until a couple of years ago, my home state of Wisconsin was on this list.) In those states, you can still have an HSA and deduct your contributions and HSA gains on your federal tax return, but when you do your state taxes, you need to add that income back in.
Choosing a tax-free bond would avoid state taxes on the gains, but you'll have to decide whether or not it is worth it based on your state tax bracket and the earnings potential of tax-free bonds vs. other investments.
Either way, if you live in one of those three states, you'll have to pay state tax on your contributions; the choice of investment won't avoid that.
I used an HSA even when Wisconsin did not recognize them. Being able to deduct contributions from my federal taxes is a big benefit, even if I still had to pay state taxes. I actually spend most of the money I put into my HSA, so the choice of investment wasn't really relevant for me.