Cain talked and answered God. its hard to do that if you didn't believe that God existed.
But then so does Satan, who constantly accuses believers before God (Rev 3:10), and in James 2:19 it says the demons believe and tremble.
Cain was never a believer. He's the first example we have of an apostate, who tried to be made righteous by his own works. Just like today you have those who reject Jesus and try to get to God their own way, including adding on extra requirements for salvation, when it should be Jesus only.
Throughout the scriptures we see the two opposing sides mentioned... sheep & goats, wheat & tares, narrow & broad road, and then you have Abel & Cain.