What is "ve'Lo Sasur ... Yamin u'Semol" referring to?
Ramban: It is referring to "Ki Sishma ... " in the previous Pasuk - 'All the B'rachos will come upon you if you will listen to His Mitzvos and not go astray 1 to the right or to the left ... '. 2
Seforno: It is referring a. to changing the Mitzvos of Hashem, especially the Mishpatim, and b. to switching the other Mitzvos for communal Minhagim or against performing them by rote - and certainly not in deference to earlier people who initiated them, and not in honor of their Creator or in order to observe His Mitzvos 3 . This is the ultimate idolatry, to make a creed to honor earlier judges! 4
Ramban: Because once you stray after other gods, you have departed from all of Hashem's Mitzvos and He has no interest in any Mitzvos that you may perform.
Taking the same line as the Ramban (Refer to 28:14:1:1), the Seforno seems to attach it a. to "Ki Sishma" in the previous Pasuk, and b. to "ve'Lo Sasur ... " in this Pasuk.
See Seforno end of Dibur, who elaborates.
Why does the Torah insert the (otherwise superfluous) words "Yamin u'Semol"?
Oznayim la'Torah: Because a person who deviates from the correct path, however slightly, will end up worshipping Avodah Zarah.