In what way do you mean bad? You can check the page rank of the domain, Alexa rank, and backlinks to determine certain statistics about the domain. But those don't give the full picture.
If your looking for an good domain u should look for the valid pagerank and backlinks first of all....and after that check if its not a dropped domain and the traffic.
No domain starts out with page rank or backlinks. Such things are nice extras to have, but they don't affect the fundamental quality of the domain name. There is no simple test for such quality. But if you have some particular domain in mind, you can ask me my opinion.
If it is a dropped, expired or newly bought from another user, I use archive.org. It uses a captcha and displays what the previous domain looked like if it had a website. DP for example shows 735 captchas dating back to November 4, 1999.
how to check if its a dropped domain ??and what can it affect me if i bought a dropped domain ?? how do u check the traffic of a domain ?do u use google analytics or else ??
you can check here, I think, to see if the domain you're interested in is a dropped domain - http://www.justdropped.com/
as you have probably meant the name quality, you could use any of valuation sites (such as estibot), or just check for keyword popularity in google keyword tool and search results