When I install an extension for Google Chrome, quite often (and maybe always) it asks for permission to have access to my data.
Is this really necessary, and how harmful/harmless is this?
Chrome's extensions are sandboxed by default and don't have access to webpages' DOM. There are different permission levels, and declaring an appropriate permission will result in Chrome warning you about them.
For instance, an extension to interact with Chrome's tabs/get current tab will require declaration of chrome.tabs permission which will bring this message:
The permission warnings are slightly pessimistic & warn about the worst case scenario, and need not imply that the Extension is bad.
For it to have access to all your data, the extension will need a permission like content_scripts. Content scripts are required if the extension must manipulate the DOM (example: Ad blockers) and as a result the message is shown.
Is it necessary? Depends on the extension, but generally yes.