Cooking along India's coasts is distinctly sour, and the sourness comes from a range of local fruits rather than from one acid. Which one a region uses shapes the whole cuisine.
Acid does specific work in this food
Coastal cooking is heavy in coconut and in oily fish, both of which are rich enough to dull the palate without something sharp cutting through them.
Acid also firms proteins and slows the softening of vegetables, which is useful in preparations meant to hold their shape rather than collapse into a gravy.
In a hot climate a strongly acidic preparation also keeps somewhat better than a neutral one, which is part of why the sourest dishes are the ones traditionally made ahead.
Tamarind brings sweetness with the sour
Tamarind pulp is both acidic and sugary, so it deepens a dish as well as sharpening it, and it carries a dark, fruity note of its own.
It is soaked and strained rather than added whole, and the strength of an extract varies enormously between blocks, so cooks taste rather than measure.
Concentrated pastes sold in jars are far stronger than home-made extract, and treating a spoonful of one as equal to the other is the usual reason a dish comes out harsh.
Kokum is sour without being fruity
Kokum is a dried fruit rind used along the western coast, giving a clean, slightly astringent sourness and a deep pink color to whatever it soaks in.
It is milder in aroma than tamarind, so it suits delicate coconut gravies where a stronger souring agent would take over the dish.
The dried rinds are added whole and removed before serving, which makes the intensity easy to control, since the acid moves out gradually as it steeps.
Raw mango is seasonal and sharp
Unripe mango contributes a bright, immediate sourness with a green fruit aroma, used fresh in season and dried as a powder the rest of the year.
Because the fresh fruit softens as it cooks, it doubles as a vegetable in the dish rather than acting purely as a seasoning.
The dried powder behaves differently, contributing sourness without moisture, which is why it is dusted over finished dishes where added liquid would spoil the texture.
They are not interchangeable
Each agent brings its own color, aroma and sweetness alongside its acidity, so substituting lemon juice for kokum gives the right sourness and the wrong dish.
Regional identity rests partly on these choices, which is why two neighboring coastal cuisines can use the same fish and coconut and still taste unmistakably different.
Indian groceries in the United States stock all three in stable forms, and the dried and frozen versions travel well enough that the distinction survives the distance.