Can I get the code of a TestFlight app?
No - you might retain a copy of the application by transferring it to iTunes in case you take legal action to arbitrate or ask the courts to assist you with your contract with your developer.

Apple doesn't receive code from developers when an app is submitted (test flight submissions work the same as app store submissions) - just the compiled program.