Summarize:

Hermit crabs love to dig, tunnel and bury themselves.   Not only is playing in substrate fun for your crab, the substrate provides the right environment for your crab to molt (i.e. shed exoskeleton, grow).  The depth of the substrate should be 3 to 4 times the size of your crab's shell and be able to retain moisture.  If your crab is the size of a dime, penny, or quarter, you will need at least 6 inches of substrate. If your crab is the size of a golf ball, use 6 to 8 inches of substrate. If your crab is the size of a tennis ball, use 8 to 10 inches of substrate. If your crab is larger than a baseball, use at least 12 inches of substrate. Any type of sand is fine for your crab as long as it is clean. Most sand that you buy will be pre-washed and/or pre-sanitized.  Pour some of the sand into a small bowl before you put it in your crab's tank and check for insects.  If you notice any strange smells when you open the bag of sand, do not put the sand in the tank. The sand may be moldy. Sand is very affordable and your crab will enjoy playing in it. Coconut fiber (i.e. Forest Bedding, Eco-Earth) comes as a hard brick when you purchase it, and it must be prepared before you place it in the tank. Place the brick in a large bowl and fill the bowl with water until you can break the brick apart with your hands.  Add the coconut fiber to the tank while it is moist.  Your hermit crab will probably eat some of the coconut fiber.  This is perfectly fine as it contains minerals that they need. You can also use pre-prepared salt water to fix your coconut fiber. Coconut fiber attracts fungus gnats.  If you notice tiny black bugs in the tank, you need to clean the tank and replace the substrate. You can also combine sand and coconut fiber. Use a 5:1 ration of sand to coconut fiber.
Make sure the substrate is deep enough. Use sand. Use coconut fiber.