On your W-2, Box 16 reports the amount of state income you received; it typically matches the amount in Box 1, the amount of federal income you earned. Box 17 reports the amount of state taxes withheld.
You will owe taxes on the state income you earned in that state, regardless of if you were a resident of the state or not.
The amount in Box 17 is not a refund, it is merely a reflection of how much tax you paid through your employer.