first thoroughly wash all the sand....
Turn off heater....
fill large bucket with water from the tank....
catch fish and place in bucket with heater and an air supply with airstone if you can...
Use a dustpan with holes drilled into the bottom for removing gravel(gets into corners great)
use a cup/jug to place sand in tank...lower carefully to the bottom and tip slowly(only important if you're running your filter still)
Turn off heater in bucket...
Level out...replant/plant....
If not doing the above step then wait at least 15 mins for heater to cool down...
replace and switch on heater.......
return fish and most of the water from the bucket...if you have the space then carefully lower the bucket into the water and tip to let the fish just swim out...less stressful than catching them again...
EDITED to add.......Plants love sand and will grow really well... the sand allows plants to forem root hairs on thier roots which helps them get nutrients from the substrate.... you will need to add root tabs for the plants