As far as I know, there are no strong differences between those words, at least in spoken language. There might be tiny differences according to the dictionary, but here are a few examples of their use, at least uses I can think of:
Ahí and allí are basically the same, but ahí seems to be less used than allí (according to RAE, though I disagree). Both indicate a physical place.
Ahí está Juan.
El accidente ocurrió allí.
Por ahí is used to indicate a place that is close by, or a place that is undetermined altogether.
Voy a caminar por ahí is something like "I'm going for a walk around".
Por ahí se cuenta que... means "It is said (around) that...", or "It is being said here and there that...", implying that a rumor is being spread, but without compromising with an actual location where this might've happened.
On the other hand, allí indicates time, but ahí does not. That is the one difference between both words. I must say, however, that I have not heard that use much here in Chile. It might be common in other countries.
Allí fue el trabajo is the example in the dictionary. It means something like the job was back then, meaning a past time that should be clear from the context (the rest of the conversation).
Allá indicates some place that could be far from you and a bit undetermined at the same time.
Allá en Rusia: "there in Russia".
Allá lejos: "there, far away". Basically, you wouldn't say allí here, because, roughly speaking, you would use allí only when you refer to a place that you can point with your finger (allí en la colina: "there, over the hill").
Allá also indicates time, but a remote past only.
Allá en tiempo del Imperio Romano.
Allá en la prehistoria.
Finally, there are a couple of uses of allá that do not apply to allí and ahí:
El más allá means "the underworld", in the sense of "the world beyond", not necessarily with a connotation of punishment (as in "hell"). When people die they go to the "más allá", and this could be heaven, hell or some other place or reality depending of one's beliefs.
Allá tú means "have it your own way". For example, if two people are discussing a plan of action and one of them is absolutely determined to proceed in a specific manner, the other one might get tired of arguing and say allá tú, as in "I give up, have it your own way". Same with allá él, allá ella, allá ellos, allá ustedes/vosotros and allá usted.