This BankRate article explained some reasons why sometimes one bank offers different rates for home purchase and refinancing in the same loan program.
Most of the time, both rates should be the same, as the value and the risk to the bank is the same no matter whether it is a purchase loan or a refinancing loan. However, bank may try to focus on one type of customers and thus will create a slight inbalance in the rates.
I do not concur the view in the article about title insurance causing difference in closing costs in home purchase vs refinancing though. At least in my example, my seller bought the title insurance for me (and it seems to be the default arrangement -- I didn't negotiate for it).