osu! has a public API that third-party services can use to expand and support the osu! platform. It used to be more private, only to be used on a per-request basis, but now anybody can use the API so long as they have an osu! account.
You can find documentation of the API at osu-api's Wiki. The current version of the API uses private keys to authenticate requests. You can obtain an API key via the account settings page. Note that the documentation on the osu!api wiki may not be entirely complete or extensive, and the API itself is not under active development.
Version 2 of the osu!api is in the works at osu-web, and it aims to be much more robust than the original. Documentation (not guaranteed to be up-to-date) can be found on its reference page.
Authentication for the new API follows the OAuth 2 protocol. Clients can be managed via the account settings page.