Yes your credit score does affect your homeowners insurance rates and your credit score can also affect your ability to even get approved for a homeowners insurance policy.
Having a bad credit score or a low credit score can cause the insurance company to deny you a homeowners insurance policy.
The insurance company uses your credit score to determine if you're a good risk for them or not and while sometimes you may be able to get homeowners insurance with a bad credit score or low credit score sometimes they may not want to issue you a homeowners insurance policy.
If the insurance company does issue you a homeowners insurance policy with your bad or low credit score then your homeowners insurance cost per month will be high in most cases.
The higher your credit score the better chance you have at getting approved for a homeowners insurance policy and the better chance you have at paying a lower per month or per year cost for your homeowners insurance.
You also need to make sure your house is up to code and is in good condition because the insurance company will likely send someone out to look over the home and do an inspection.
To keep the homeowners insurance on the home you must also maintain the home because if you fail to maintain the homes exterior then the insurance company may notice that when they send someone out to do the inspections periodically and then send you letter or talk to you giving you a certain amount of time to fix the problems with the house or they'll drop your insurance coverage.