Only to engines that require it. If you drive a car that requires premium fuel, you will know about it from the owner's manual. BMW, Audi, Acura, etc... All high tech car manufacturers have developed engines that need high octane fuel, same for motorcycles, if you run it with regular you will "clog" your system, you will get poor fuel mileage, you can do the comparison, but in the end, the money you save on regular gas will go into the garage bill for the damage it did. if the car maker tells you the octane level needed for your engine, you better believe them, the compresssion ratio has an important part to do in the fuel octane needed too .
Or, on the other hand, many non high-end vehicle manufacturers specifically recommend regular 87 octane fuel saying that higher octane fuels can damage sensors and hinder emission controls. The Owner's Manuals for both my 2002 Grand Caravan and 2002 Dakota, specifically mention this.
Bottom line: Check your owner's manual or with your dealer, and use the recommended grade, whether it's premium, mid-grade, or regular unleaded fuel.