Many different variables have an impact on your credit score. The big factors include payment history, how long the account has been open, balance to limit ration and credit inquiries. All of these have a large impact on your credit score with the most important being payment history. One 30 day late payment can have a negative impact on your credit score and drop your credit score as much as 100 points.
Keep in mind, the balances of your credit cards have an impact on your credit score. If your credit cards are maxed out, your credit score will have an impact and be lower than it could potentially be if you had lower balances on your credit cards. As a rule of thumb, keep your balances below 50% of the credit limit to keep your credit score as high as it potentially can be without negative impact.
Another impact to your credit score is the type you credit you have. Creditors want to see a variety of debt that you hold. Ideally you want to have all three kinds of debt: Revolving(i.e Credit Cards), Installment(i.e. car loan) and Mortgage Debt.
It helps to keep older revolving accounts open, rather than closing old credit card accounts. The length of time you have had open credit established is a consideration for your what impacts your credit score as well.
Late payments are a factor that can impact your credit score. Be sure to make your credit card and mortgage payments on time to maintain a good credit score.
Credit Scores could be the single most important factor when determining your solvency to actually pay back a loan on a mortgage. The higher the credit score, the better. Anything above a 720 score, will give you the most favorably terms with regards to financing.