The question is often asked but the answer is not that straight. Some people prefer to choose a domain name right at the inception of a business idea. Other would wait till formulation of their concrete business plan. Still many would like to see the product completed before they rush to domain name registrar to register a domain name.Each kind argues about pros and cons of their own timing. While early jumpers want to capitalize on their timing lest the name might become unavailable in future, the late goers want every thing to be in place before they try the domain name registration.
In my view domain name should be registered after you have made a clear business plan. Once you are clear what business you are going to do, you should go and register the domain name related to your business.
But after you have registered the domain, you should not let it lie idle. While the product is being created, you should start advertising your URL. For that you would need to create a one page webpage and publish it. It should contain information about your upcoming product. You can advertise in forums, web articles, classifieds. All of them are free and would help to generate a good
Further you can get free autoresponder account and capture email address so that your subscribers can be offered a prelaunch discount.
If you simultaneously build you trafiic and list while you are creating your product it would give you huge push when you actually begin.