When is the correct time to use 'granter' or 'grantor'

So this is essentially the difference between adding an -er to the end of a verb and using the special noun form of a verb (usually formed like -or).

Grant as a verb means:

To give over; to make conveyance of; to give the possession or title of; to convey; -- usually in answer to petition.

So granter would be someone who gives over.

Grantor has the specific meaning of:

A person who grants something

In this case, the two definitions seem to be nearly identical. Since the special noun form has a more specific and narrower meaning, I would say you should prefer it over the less specific and broader verbal form, as long as the meaning of the special noun form fits appropriately.