While they are synonyms, 모자라다 sounds colloquial and suits concrete comparisons well whereas 부족하다 can have a more formal feel. 모자라다 also means "dumb" or "retarded" when referring to a third person, which 부족하다 does not.
For example,
- 케이크를 만드는데 설탕이 모자랐다/부족했다 (모자라다 works better in everyday situations like this).
- 그 사람은 참을성이 부족하다/모자라다 (부족하다 suits abstract meanings better).
- (저는) 부족하지만/모자라지만 최선을 다하겠습니다 = I have my own shortcomings but I will do my best.
- 그 친구는 조금 모자라 = He's a bit of a retard.