Article 80 of the U.N. Charter makes the settlements legal. On top of this, no court with proper jurisdiction ever passed a judgment that the settlements were illegal. The International Court of Justice refused to pass a judgment on this topic; they issued a legal opinion instead. Therefore, the settlements are not illegal.
Russia vetoes UN resolution on MH17 special tribunal (Reuters)
from the article: Israel attacks European criticism of West Bank settlement activity