Simply put, your state income tax is calculated according to the laws of the state in which you were a resident when you earned your income.
If you earned income by working in one of the "nontaxable" states but you are a resident of a "taxable" state that does collect income tax, your resident state will tax you on the income you earned in the "nontaxable" state.
If you're not sure about all of this, be sure to check the rules for your state - they all vary and each state has their own way to assess what is or is not taxed. See State Taxing Agency Information.
Can you give me an example?
Sure. We are commonly asked why income earned in states that don't assess income tax (Alaska, Florida, Nevada, South Dakota, Texas, Washington, and Wyoming) is included as income on a "taxable" state return.
A full-year Oklahoma resident that earned income in both Texas and Oklahoma. She notices that TurboTax is including her Texas income on her Oklahoma return. Shouldn't the Texas income be excluded from her Oklahoma return because Texas doesn't collect income tax?
The answer is no. It is a widely-held belief that income earned in a non-income-tax-collecting state is exempt from taxation by the resident state. This is not true. In this case, our taxpayer's Texas income would be taxed as Oklahoma income because she is an Oklahoma resident and the Texas income was not already taxed.
Now let's say our Oklahoma resident moved to (or from) Texas during the tax year. Part of her yearly income came from Oklahoma sources and was earned during the time she was an Oklahoma resident. The remaining income came from Texas sources and was earned while she was a Texas resident. Can she exclude her untaxed Texas income from her Oklahoma return?
You bet. In this case, she would file an Oklahoma Part-Year Resident return for the Oklahoma income she earned while a resident of that state. The income she earned as a resident of Texas would remain untaxed because she earned it In Texas while she was a resident of Texas.