The nation of Thamud comes after the 'Aad people as the worst transgressors. Basically, their deviation was the same as of the people of Hazrat Nuh and the 'Aad. They also believed in the existence of Allah and His being the Ilah and the Rabb but they did not agree that He was the only ilah, that He alone was worthy of all 'ibadah, and that He was Rabb in all the senses of the word. They insisted that there were others, besides Allah, who too could accept prayers, grant favors, and remove distress, and in moral and cultural matters they took their law from their chiefs and priests instead of following Divine guidance. It was this which made them into a tragically misled people and brought down on them Allah's punishment:
And (O' Muhammad) if they turn away (and do not listen to what you say) then say to them: I am warning you of a punishment the like of that which visited the 'Aad and the Thamud, to whom Prophets came repeatedly telling them not to give their 'ibadah to any but Allah, and whose only reply was: 'If our Rabb had wanted, He would surely have sent down angels, (but since He did not), we reject the message which you bring'. (Quran 14:13-14)
And to the Thamud (we sent) their kinsman Saleh, who said to them, "O' my People: 'give your 'ibadah to Allah; you have no ilah but He."...They replied, "O' Saleh, we had great hopes of you (and now you spear strangely); Do you mean to forbid us to give our 'ibadah to those to whom our ancestors used to give their?" (Quran 11:61-62)
When their kinsman Saleh said to them: "Do you not fear (God)? I am verily an apostle worthy of trust where fore fear God, and obey me and not obey all the words of transgressors who cause strife in the land and who do not mend their ways." (Quran 26:142-143, 150-152).