Biologically active substances whose activities affect or play a role in the functioning of the immune system.