Configuration Plugin vs. Task

I see that the plugin object can be configured via its plugin extension and that tasks can be configured via the bean methods.
Do you have any guidelines as to when they are suitable?