Borrowers with good credit scores typically have more options and are offered lower mortgage interest rates because lenders see them as a lower risk to not paying back the loan. Borrowers with poor credit scores are seen as a higher risk to the lender, which may offer higher rates as a result.
But an imperfect credit score (typically one under 620) is not a deal-breaker, particularly if you qualify for one of the government backed loans (FHA, VA, USDA, etc.), which have more lenient income and credit requirements. Lenders may also counter the risk of a borrower with a low credit score by offering a higher interest rate.