A soft inquiry NEVER affects your score. Otherwise all those "prequalifications" for credit cards you get in the mail would be affecting your credit score. Hard inquiries are given whenever you're ASKING for credit. When the dealer pulls your credit it is to qualify you for financing that YOU have requested. It's a hard inquiry. Hard inquiries hurt (especially more than three or four in your report at a time - otherwise it only drops you a few points).
All that said, if you're applying for the same type of loan (i.e., auto, mortgage, etc.) within a specified time period (two weeks if I recall correctly), it only shows up as one inquiry. The bureaus assume that you're "shopping" for a loan. For instance, when I got my Audi TT I applied for about five different loans inside of a week to get the best rate, and I only have one inquiry on my report.
So when should you let them run your credit? That depends. Most finance officers (and any good salesperson) should know what credit score you'd need to get any kind of deal on the table. If you know your score and want to keep shopping, I'd supply them with a print out of the score so they know you're serious and just wait until you've made a decision. If you know you're going to buy a new car within the next couple weeks, don't worry about it.
Personally, I waited until we had a deal on the table that was entirely dependent on having A1 credit. At that point, they insisted on running my credit to see if the deal could even be made. I agreed, and drove home in my new GTI.