You may be a great credit risk, but your score won't reflect that if there are errors in your credit report. The last thing you need is to have someone else's delinquencies wrongly assigned to you.
Or you may think you've got great credit, but don't realize that your spouse has been hiding debt from you, and killing your score in the meanwhile.
Unless you make yourself aware of what's in your credit report a few months before applying for a loan, you'll have no idea how a lender will perceive you, rightly or wrongly. And you won't give yourself the opportunity to improve your score.
To boost your score: Order a free credit report once a year from each of the three major credit bureaus, and make sure they're accurate. Order one every four months by going to annualcreditreport.com or calling 877-322-8228.
Two annoying but true facts: Credit scores aren't free, and the credit bureaus don't share information on you, so your credit reports and the scores based on them may vary. So if you're planning on applying for a mortgage or other big loan, you might do well to order a the 3-in-1 deluxe package from myFICO.com for $47.85. That will include your credit reports from all three credit bureaus as well as the FICO scores based on those reports.