No, you do not need to deactivate your iPhone before deleting everything off it. However, deactivating your iPhone makes it easier for the new owner to activate it.