unless the sand is really deep and the ground underneath is extra permeable, I would go the extra mile and build a french drain or something similar under the sand pit. standard landscaping cloth is water permeable and won't let sand through.
So, what I would do is:
Dig a nice, deep pit
Put river rock in bottom 1/3 of pit
Put pea gravel in next 1/3 of pit
Put landscaping cloth down on pea gravel and up the sides of pit, securing it into the ground on the sides of the pit with landscaping staples
Fill remaining space in pit with sand
All the gravel and rock is so that large amounts of water will quickly drain through and not sit in the sand. If there is a lot of water, then I would dig at least 4-6ft down for the pit.