Plants can be self pollinating, however once insects began to pollinate plants (probably by accident) evolution favored those plants that most effectively utilized those new pollinators. At the same time insects that began to more effectively gather nectar had an advantage. As a result they both evolved together and without them we wouldn't have fruit trees and most modern vegetables.