I have been doing SEO for 4 years and can say that URLs and domain names do affect search engine rankings quite a bit.
For example,
If you have a site called online-affiliate-programs.com that was about affiliate programs and then you had a site called affprogs.com, then the first one will get much more benefit than the second.
Don't forget that quite a few sites that link to you use your domain name in the url's anchor text plus some will even use the following in the anchor text: "online affiliate programs" or for the second domain "aff progs". Now you can see which one will benefit the most. It would be the first one as it includes affiliate programs in the anchor text and the page is about affiliate programs.