It used to work great. Lets say is your domain name is "FreeForum.com". If someone search for "Free Forum", your site will most likely be on top.
But nowadays search engines had smarten up. Domain name still plays a huge factor in Search Engine Optimization. But just by having your domain name the same as the key term won't necessary means your site will be on top for sure. (Although I would say you will have a huge advantage still)
I agree with myhfelix. Keywords in your domain or a cleverly named file page will help, but there are about 200 other factors google uses to rank your website on it's SERPs. Content being the most important.