As John states in his answer, a factory-reset is sufficient in most cases. I doubt a service technician would take the effort required to restore the data from your storage – though it's definitely possible.
What John had in mind, however, is true: If flash storage is really wiped, all data is gone from it. It would take a highly specialized forensics expert a long time to restore at least a part of it. So unless you have the secret formula for a longevity serum stored on your device, and your service technician knows that, it's definitly not worth the trouble.
If you want to be on the absolute safe side, take a look at Nuke My Phone resp. Nuke My Tablet. These tools do not simply delete your data or wipe the storage once, but they overwrite it multiple times, then wiping it, and then finalize their work by a factory-reset. I very much doubt that a single file would be restorable after that procedure.
Btw: Always think of your external SDcard, which might not be covered by the procedure. You should better remove that and keep it with you; the service techs don't need it anyway.