Illegal = against the law; Illegitimate = outside the law, not "kosher". Something can be illegitimate without being illegal - e.g., a child out of wedlock - but all that's illegal is also illegitimate. In other words, illegal is more clear-cut, and has clearly defined consequences.
Arab MKs postpone Al-Aqsa visit planned for Sunday (Haaretz)
from the article: After uproar, Netanyahu orders stop to West Bank housing tenders