When do I use the word antecedent and when should I prefer predecessor?
An "antecedent" will - with the -ent suffix - tend to be less material, and more abstract. Thus, an antecedent tends to be an idea or concept that preceded the current mental/juridical/linguistic environment.
A "predecessor" will - by virtue of the -or suffix -- tend to be more material, and objective. Thus, a predecessor tends to be a worldly person or thing that came before in time.
A person can be my genetic predecessor, but they can not be my genetic antecedent; a person's character, or accomplishments, however, can serve as a historical antecedent to my own accomplishments or achievements, and therefore that person can be said to be my own "antecedent".
Unless otherwise specified (or ruled out by context), predecessor tends to refer to the thing immediately before the one you're talking about, while antecedent just means something that preceded it some time earlier, but was not necessarily immediately before.
Antecedent can also mean events that happened before - it doesn't necessarily mean ancestors.
Predecessor generally refers to a person or an object.