In an earlier question, I asked if it was a commandment to believe in G-d. As with so many areas, there were differing opinions. Some of the respondents claimed that there would be no point in being Jewish if one did not believe. While I disagree with that view, surely we all recognize that there are Jews who do not believe who, nonetheless, have varying levels of observance. Irrespective of whether or not one sees a point to doing so, should a non-believing Jew observe (the other) commandments?
In a word, yes. The Midrash (Eichah Rabbah, intro. 2), paraphrasing Jer. 9:12, states:
הלואי אותי עזבו ותורתי שמרו, מתוך שהיו מתעסקין בה, המאור שבה היה מחזירן למוטב
"Would that, even if the Jewish people abandoned Me, they had kept My Torah! By being involved with it, the illumination in it would bring them back to the right path."
Or as the Talmud (Sotah 47a, et al) puts it:
לעולם יעסוק אדם בתורה ובמצות, ואף על פי שלא לשמה, שמתוך שלא לשמה בא לשמה
"A person should always be occupied with Torah and good deeds, even if not for the right reasons, because from doing it for the wrong reasons he will come to doing it for the right ones"
- and goes on to illustrate this with the case of Balak, the Moabite king who offered numerous sacrifices with the improper intention of convincing G-d to allow the Jewish people to be cursed, yet who ended up being the ancestor of Ruth (and, through her, of King David and eventually of Moshiach).