I was a part-time resident
Maine's law is that anyone who is a resident of Maine for any part of the tax year, and has taxable Maine-source income, must file a Maine return. http://www.maine.gov/revenue/faq/income_faq.html#faq1040_4
Whether you actually owe tax or are getting a refund is irrelevant.