I've never had to do it, but I know Apple has an official process for transferring apps, and I believe they've even made it easier to do these days than it used to be. Had I the need to do it, I'd probably go looking through the iTunes Connect documentation.