An early withdrawal from a retirement account (1099R, box 7 coded a 1or 2) is taxable on a PA income tax return to the extent that the withdrawal exceeds your cost basis in the plan. Your cost basis is the sum of all your contributions into the plan (does not include any employer contributions or earnings) less the sum of all previous distributions from teh plan. Some retirement plans will show this figure on the periodic statements you receive. Or you may need to contact the plan administrator for the figures.
I found this information from PA Dept. of Revenue on page 11 on early withdrawals of 401K funds: http://www.revenue.pa.gov/FormsandPublications/FormsforIndividuals/Documents/Personal%20Income%20Tax...
Distributions from an IRA, including a federal Roth IRA, are taxable to the extent the distribution exceeds
your previous contributions. Distributions you receive after retiring but before age 59 1/2 are taxable even if you
receive substantially equal payments, and you do not pay the federal penalty for an early withdrawal. PA law
does not have any exceptions similar to the federal exceptions for withdrawal before age 59 1/2. However, distributions from an IRA are not taxable if the payments are:
1. Received, including lump sum distributions, on or after reaching the age of 59 1/2
2. Paid to the estate, or designated beneficiary, of the participant because of the participant’s death
To check the status of your refund of state of PA: https://www.doreservices.state.pa.us/pitservices/wheresmyrefund.aspx