2005 Subaru Impreza check engine light turns on and off

check engine light for days then goes off for days, then comes on again.

Take it to an auto parts store and have the codes read when the light is on. Post the codes here (P1234, like that) and we will try and help.

Otherwise, take it to an auto shop and have them take a look at it.