Actually it's 7 states.
Arkansas, Article 19, Section 1:
No person who denies the being of a God shall hold any office in the civil departments of this State, nor be competent to testify as a witness in any Court.
Maryland, Article 37:
That no religious test ought ever to be required as a qualification for any office of profit or trust in this State, other than a declaration of belief in the existence of God; nor shall the Legislature prescribe any other oath of office than the oath prescribed by this Constitution.
Mississippi, Article 14, Section 265:
No person who denies the existence of a Supreme Being shall hold any office in this state.
North Carolina, Article 6, Section 8
The following persons shall be disqualified for office: Any person who shall deny the being of Almighty God.
South Carolina, Article 17, Section 4:
No person who denies the existence of a Supreme Being shall hold any office under this Constitution.
Tennessee, Article 9, Section 2:
No person who denies the being of God, or a future state of rewards and punishments, shall hold any office in the civil department of this state.
Texas, Article 1, Section 4:
No religious test shall ever be required as a qualification to any office, or public trust, in this State; nor shall any one be excluded from holding office on account of his religious sentiments, provided he acknowledge the existence of a Supreme Being.
However in theory you could get around this by acknowledging the existence of the Flying Spaghetti Monster.