I'm currently developing a IIS 7 managed module, that will be distributed along with a server-side software.
How can I manage settings/configurations within the IIS module itself? For example, how can I let the user set an API-key that will be internally used by the module?
I know that in Apache or in nginx I can add settings directly in the VirtualHosts file (apache) and in nginx configuration files (nginx). I wonder if is there a "best practice" for IIS modules.
Yes there is, you can use web.config files for that, optionally you could define your own Configuration Section, but depending on how complex your configuration is, maybe using the existing appSettings section is enough. From your module you can just read appSettings like: How to read appSettings section in the web.config file?
and the best thing is that this includes built-in UX in IIS Manager to manage Application Settings. The bad part is that it will not give validation for your customers, nor "intellisense" to guide them through the configuration.
If you want to define your own section you can look at: http://www.iis.net/learn/develop/extending-iis-configuration/extending-iis-schema-and-accessing-the-custom-sections-using-mwa when you add your Schema file, in IIS Manager you will be able to use "Configuration Editor" and will give a simple UI for your customers to set that with validation, data type, collection management, etc.