There are two threads here. What Tia Dalma says, and what can be argued to be true in the end.
What Tia Dalma says
Tia Dalma: If you don't want it, give it back.
Jack isn't required to have the sand. Evidence by Tia's suggestion that Jack gives it back.
Jack Sparrow: [greedily] No!
Jack refuses to give it back. Even though he questions whether the sand helps him in any way; Jack seems to want to err on the side of safety and keep the sand in case it turns out to be useful.
Conclusion:
Although he has no idea why, Jack feels safer with the sand than he does without. Otherwise, he would have given the sand back.
Tia Dalma: Then it helps.
Tia Dalma now argues that Jack has proven that he himself feels safer when he has the sand (which is why he refuses to give it back). She then argues that this is the way in which it is supposed to help Jack: it makes him feel safe.
It's like giving a night light to children who are afraid of the dark. Logically, you could tell a child that if such a monster exists, it would kill and eat him regardless of that night light.
But that child will never have a good night's rest again. Therefore, you pretend that night lights are an effective method of protecting yourself from monsters, and then give the child a night light (which it now believes to be a good protection from monsters).
What turns out to (possibly) be true
Jack drops the sand, bends down to pick it up, and unknowingly dodges a shot that would otherwise have killed him.
So Tia Dalma was actually right all along, the sand did save Jack (just not in the way that he was expecting).
However, depending on what you think of Tia Dalma, it's possible that she knew that this was going to happen.
There are a few possibilities here:
- Tia Dalma did not know this was going to happen. She only gave Jack the sand like you give a night light to a child.
- Tia Dalma did not know this was going to happen, but she knew that Jack needed the sand. Call it a vision, which makes her realizes what she must do, but not why she must do it.
- Tia Dalma knew exactly what was going to happen (Jack gets killed by that shot), and therefore gives Jack the sand. She knows Jack's character, and therefore can foresee that Jack is prone to sing his "jar of dirt" song, drop the jar, and then panic and bend down to pick it back up. (edit it = Davy's heart, which he thought was still in the jar)
What we can say for certain is that the sand saved Jack, just like Tia Dalma claimed it would. However, due to the very circumstantial nature of how Jack gets saved, we cannot say for sure whether Tia Dalma was aware of this circumstantial nature or not.
At best, she was fully aware. At worst, it's pure coincidence and Tia only intended to make Jack feel safe.
Update - Hindsight 20/20
If you review the trilogy after everything has been revealed, there is more to the story than we initially thought.
- Davy Jones locked Calypso in the human form known as Tia Dalma. Calypso wants to be free again.
- Jack Sparrow is a thorn in Davy Jones' side. Davy Jones is nigh untouchable, yet Jack seems to be extraordinarily capable of messing with Davy in ways that no one else can. Not only that, but Davy also seems to have attributed value to Jack Sparrow personally (hence why he bargains for a hundred souls in exchange for Jack's. Jack is special to Davy).
- For the Pirate Council to release Calypso, there must be a big enough threat to the Pirate Council. Davy Jones is the perfect threat.
- Jack is visibly distraught by the black mark. Contrary to his earlier behavior, he is now afraid. Although not proven yet, it's possible that Jack will choose to stay on land, therefore shying away from any confrontation between him and Davy (or his Kraken).
Calypso is clearly incentivized to keep Jack around and put him in Davy's way, because it is the best way for Calypso to be freed again by the Pirate Council.
To remedy Jack's fears (which may cause him to avoid conflict with Davy altogether), Tia Dalma gives Jack a fake sense of security, so that Jack will stay in the conflict.
She conjures up some bullshit explanation that is loosely referencing Davy's supernatural limitation (not going on land), and presents Jack with some dirt, arguing that this must therefore have the magical quality of protecting him from Davy.
Jack's actions directly cause Davy Jones to escalate his behavior. That escalation is key to making Davy seem like a viable threat to the Pirate Council, who are then incentivized to free Calypso as a way to protect themselves from Davy.
Calypso was playing the game all along. Barbossa and Jack are both being manipulated by her, without them even realizing it.
Given enough of a budget, you could rewrite the trilogy from Calypso's point of view, and it would play out like House of Cards: manipulating the system to get what you want, and pitting others against eachother without them realizing you're the puppeteer.