How do I delete all data from my Android phone? My phone has got some error and I am returning it to the service center. As my phone contains my personal data, images and videos I would like to erase them so that they can never be recovered (even after being rooted).

Is there any easy way to do that because I am not an Android developer.

Does factory reset do this trick for me?
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.