Mix the baking soda and sugar together, then pile it onto the soaked sand surface.
Next, just light it with a long-neck lighter. Keep some water nearby just in case you need to extinguish the fire.
Science Behind It
When the mixture burns, the baking soda gets hot, and it decomposes to release carbon dioxide gas. A lack of oxygen in the sugar from the combustion creates carbonate and water vapor. The pressure from the CO2 gas pushes this carbonate out to form the snake, which should continue growing for 20 minutes, give or take.
Tips
You really need to soak the sand because the fire needs enough fuel to burn off the baking soda and sugar mixture, other wise is will not grow all the way.