Beginning on 15 June, app-specific passwords will be required to access your iCloud data using third-party apps such as Microsoft Outlook, Mozilla Thunderbird, or other mail, contacts and calendar services not provided by Apple.
If you're already signed into a third party app using your Apple ID password, you will be signed out automatically when this change takes effect. You'll need to generate an app-specific password and sign in again.
To generate an app-specific password, you need two-factor authentication turned on. Sign into your Apple account at https://appleid.apple.com, Go to App-Specific Passwords under Security and click Generate Password.