An advice which seems to give some insight for this would be: if you can substitute the *it* in the English sentence by a *this* or *that* then it is probably a *ce*, *cela* and other variants of them which is needed in French. You have to be aware that the *it* pronoun (neutral gender) does not exist in French, that is why it might be tedious to translate sentences such as "I like this dog. It is a good friend.", for which you have to know if the dog is male or female (if you don't know go for the male version).

More generally, *ce*, *cela* (*cet*, *cette*, *ceux*, etc.) are demonstrative pronoun which means they refer to something you already mentioned or something which is obvious according to the context. Whereas *il* and *elle* are just the French equivalent of *he* and *she*, plus the expression *there is/are* in English which translation is *il y a* in French.