I'm not sure whether the question should be "Is it a good idea", and not, "Will I be ABLE to?"
Depending on just how bad your credit is, you may or may not be able to obtain financing, for one. Even if you are able to obtain financing, you may not be able to obtain the best rate available to you.
IS it a good idea? Well, it depends on your situation outside of your 'bad credit'.
Are the circumstances that impacted your credit negatively now under control? Are you able to now repay your debts in a timely and responsible manner so that taking on yet another financial commitment will not further impact your credit? Are you actively taking steps to improve your credit?
It is hard to say whether or not it is a good idea to attempt to buy a home without knowing more about your specific situation. You can meet with a lender that can help you honestly assess whether or not buying a home right now will not only be feasible, but a good idea.
The best thing you can do is to work towards improving that score. In the case you have not already been counseled on how to improve your credit score, here is an article that may be a good start: http://articles.moneycentral.msn.com/Banking/YourCreditRatin
If are actively working towards your goal of improving your credit, and your creditors can see and attest to this, you will be on your way.
Good luck to you.