Lingual tonsils are lymph nodes on the surface of the back of your tongue. They are white cell producers that activate when infections and viruses enter the body. That's why when you're sick they will sometimes grow and be more white than pink.
Lingual tonsil is located posterior to the tongue,and its function is to fight against the infection,when enlarged they obstruct the airways and eventually person have to go for tonsillectomy.
The palatine tonsils consist mostly of lymphatic tissue and vessels with high prevalence of B and T lymphocytes so the purpose of tonsils is likely to be immune system function, interception of bacteria and viruses.