Your credit score, which is used to gauge the likelihood you'll pay back your loans, is also used to gauge your insurance risk. The reason, though it may seem unfair, makes a lot of sense. Insurance companies want to determine, based on your creditworthiness, how likely you are to file a claim. If your credit score suggests that you're a responsible consumer, your insurance company will take that into account when determining how much risk they want to take with insuring you.
Remember that car insurance is to protect yourself financially if you're in a car accident. So, it stands to reason your financial situation will be considered when insurance companies decide how much money they're willing to risk on you.
Sadly, even if you have "good" credit, you may still end up paying more than someone with "excellent" credit, regardless of your driving history, simply because of your score. You can have a clean driving record and just a "good" score, and you may still pay more than someone with a moving violation, but an "excellent" credit score.
So pay your bills on time, all the time.