Can apps see your Apple ID?
No, apps can't see your Apple ID unless you allow it. Pro Tip: use a unique email address for your Apple ID, that you use for no other purpose. Also use unique email addresses for each app or service that you don't completely trust (i.e., all of them).


  By default, developers don’t have access to your Apple ID, just a unique identifier. If you give your permission, developers can use your email to let others find you in their app. You’re always in control of these permissions and you can turn them on or off at any time. Your data isn’t shared with developers, unless you choose to share or post publicly.


Our Approach to Privacy

Yes, it is technically possible for apps to know that you previously had their app installed. This was the cause of the recent Uber controversy:

Uber responds to report that it tracked devices after its app was deleted

Unfortunately, it's very difficult for users to prevent this. At the least, from what I've been able to determine, you'd have to not use iCloud Keychain to share data across devices, and you'd have to factory wipe your phone and NOT restore it from a backup.

See also:

What unique fingerprinting information can an iOS 10 app collect?