This is story related, and can't be missed as you progress through the game.
1st Encounter: You must throw water barrels at Sandman first, then you may attack. As you weaken him his attacks will start to advance. Once he is wet, attack him and jump over him when he attacks (facing his back). When he is shooting sand at you, it's best to keep avoiding it until he stops.
2nd Encounter: He will try to crush you with his hands, so move to where the carts full of water barrels are and make his hand smash into them. When his hand looks muddy, attack with strong attacks. When he shoots the balls of sand at you, throw water barrels at him until his head falls near you. Now attack his head.
Final Encounter: There is a giant sand storm tornado around you and once in a while Sandman's head will pop out. Hit his face (any face) with either brown water barrels or a grey water barrel to make it muddy, then zip over to it and attack with strong attacks. Just keep doing this until he is defeated.