Often a Buyer will have an idea of what they think they can afford. However, if you are going to be getting a loan it is important to meet with a lender first and this is why:
1. The first answer is obvious. It is so you know what you really can afford.
2. A lender will provide you with a Pre-Qualification Letter. When you find that perfect home and write an Offer, the Seller will expect to receive a letter a Pre-Qualification Letter from the lender along with the Offer. I have seen Buyers find a home, scramble to get a the letter and loose out on the home. Even better then a Pre-Qualifcation Letter is a Buyer who has been Approved.
3. Learning about different types of loans and fees will help you get the best loan for you. When you buy a home the contract will provide for a certain amount of days for you to get the loan. Therefore, it is very important to be prepared. You don't want to just get any loan. Being prepared will save you money and provide for a smoother transaction.