I'll go ahead and disclose right off the bat: I'm not a financial advisor, nor an accountant or tax advisor. With that being said, it is best to meet with your own consultants so you can rest assured that your retirement account downpayment funding works best for your specific personal situation.
Legalese aside, there are some very creative ways to borrow from or take a loan out against different retirement accounts. There are rules, some penalties, and other guidelines to follow when doing this, so make sure before you head down that road, you have a nice long chat with your own advisors. If you don't have any, I can recommend some very talented professionals to help you out. There is never a hard and fast rule about which type of account (Roth IRA, Traditional IRA, or 401(k)) is the best to use towards your downpayment, so I'll go into detail the differences with each.
****First Time Home Buyers: First time homebuyers are classified as those who are buying their very first home, or those who haven't owned a home within the past three years. Keep this in mind...
Using Your Traditional IRA
Using money from your Traditional IRA is the least complicated withdrawl method, but not always the best situation. You and your spouse can take a maximum of $10,000 for your first home without penalty, however those withdrawls are taxable.
Getting a Boost From Your Roth IRA
Roth IRA's are retirement accounts funded with after-tax contributions. What's interesting about this form of account is you can withdraw your CONTRIBUTIONS at any time, for any reason, at any age, tax-free. Where it gets more complicated is when you try to withdraw EARNINGS. If you and your spouse withdraw earnings from your Roth for a downpayment on your home, you will be subject to paying taxes and a 10% early withdrawl penalty (if you're under age 59-1/2). BUT WAIT! If you're withdrawing from your Roth to purchase your first home, you and your spouse can take $10,000 each towards your down payment and avoid the 10% penalty. If you've had your Roth for 5 years or more, you'll also avoid a tax bill.
Tapping Your 401(k)
When using your 401(k) to help with a downpayment on a home, generally you take a loan out against the 401(k). Most likely you're going to be able to borrow half your balance (up to $50,000) and pay back interest to your account. The interest on the loan is typically the prime interest rate plus one or two points. The major drawbacks to borrowing against your 401(k) is that the loans need to be paid back after 5 years, or just 3 months if you leave or lose your job.
Personally, I beleive this is one of the best ways to fund a downpayment, especially for first time homebuyers who haven't seen alot of appreciation in their retirement account portfolios. Investing in a new home at these interest rates and prices will likely be an excellent choice.