if waste from the fish gets into the sand and gets decomposed by anaerobic bacteria, it can form pockets of methane that can escape and kill the fish. however, there are some simple ways to prevent this from happening.
1: lots of plants. the plant roots growing through the sand will soak up excess nutrients and break up pockets before they can become dangerous.
2: Malaysian Trumpet Snails. these are asexual snails that burrow through the sand during the day and basically do the same as the plants, burrowing and disrupting pockets before they can become dangerous. these snails can reproduce out of control, but just don't overfeed your fish and keep the tank clean and their population will remain at reasonable levels.
3: coat hanger. straighten out a coat hanger and run the tip through the sand. this will break up the anaerobic pockets and cause minimal diruption to the sand (it won't all go flying around and clog your filters)
otherwise, sand is a great substrait and my plants love it. they are doing very well, and my fish are perfectly healthy.