Exemption, immunity are comparable when meaning the act or fact of freeing or the state of being free or freed from something burdensome, disagreeable, or painful.
Exemption is more restricted in its meaning, for it applies usually to a release from some legal or similarly imposed obligation or burden to which others in the same circumstances and not similarly freed are liable.
Immunity covers all cases for which an exemption may be given or obtained, but the term carries so strong an implication of privilege and of freedom from certain common restrictions that it is often used in reference to persons or classes of persons especially favored by the law or by nature.