Unfortunately, when/how to focus on marketing will depend on the product. For example, if you’re developing a cancer drug, the marketing probably isn’t as important initially as proving you can develop the drug. Conversely, if you’re developing a new brand of vodka, the marketing strategy is going to be more important than the beverage.
What’s important is that, in my experience, entrepreneurs should be thinking more about marketing than they usually are. It deserves at least as much attention as your product development, and that’s what too few entrepreneurs realize.