Is it safe to let apps use Touch ID on an iOS device? There are some apps that allow logging in via Touch ID (for instance banking apps).

I know that it is relatively secure to use this feature as long as no-one has illicit access to my fingerprints, and the device is not physically accessed.

But what if the database of the application gets compromised?

What kind of information will be leaked? What sort of actions could be taken having this information? Does iOS protect this information from being leaked? Is this documented somewhere?

I can guess that the application will not be given direct access to the finger-print photo, there should be some kind of hash which doesn't allow restoring the original finger-print. In the ideal case, iOS would not even allow the app to access a hash, instead it would provide some way of authorizing.
The application does not have access to the fingerprint data stored on the device. The API provided by Apple tells the app if the auth process was successful by a simple yes/no value. No hash is provided. Here's the documentation.

Also the fingerprint data is stored in the device's "Secure Enclave" and is not accessible. 


  The Secure Enclave is part of the A7 and newer chips used for Touch ID. Within the Secure Enclave, the fingerprint data is stored in an encrypted form which - according to Apple - can only be decrypted by a key available by the Secure Enclave thus making fingerprint data walled off from the rest of the A7 Chip and the rest of iOS.


Source: The iPhone Wiki