Responsible pet owners DO NOT leave pets unattended in hot vehicles. Unfortunately, not all pet owners are responsible. Others assume a pet will be fine left alone for a few minutes in a car if the weather is not blazing hot outside. This is not true. If the sun is shining and it's above 60 degrees outside, an animal left in a vehicle can be in danger. So, if you see an animal suffering in a hot car, what should you do?
Be aware of the current outdoor temperature and you can figure out how soon the inside of a car will become deadly. Remember that an animal that suffers a heat stroke often dies within minutes. Too, pets with short snouts, like pugs for example, have more difficulty breathing properly in hotter temperatures.
If the outside temperature is 75 degrees, within 10 minutes, the temperature inside the car can become 100 degrees Fahrenheit. Within 30 minutes, it can reach 120 degrees Fahrenheit. If the outside temperature is near 100 degrees, the inside of the vehicle can reach 140 degrees in 15 minutes.
Researchers at Stanford University School of Medicine warn that even on cool days, heat inside vehicles parked in the sun can rise to life-threatening levels. Dr. Catherine McLaren, clinical instructor in emergency medicine at Stanford, said this is new - researching temperatures inside cars on cooler days. She said it was known that children have died in hot vehicles in days when the outside temperature was as low as 70 degrees Fahrenheit. 
In many instances you can call local police or animal control and the authorities will rescue the animal. However, suppose the animal appears to be dying and you have only seconds to make a decision.
I suppose it's a matter of weighing right and wrong for many people. What's more right or more wrong? Bust the window and save the pet or leave the window and let the pet die. Thankfully, most people would choose to bust the window. However, be aware that in many states you have no legal right to do this and will face consequences for your actions.
If you choose to bust the window, immediately remove the animal to the shade. Place the animal in cool water if possible, never cold. Since many animals are left in parking lots, water is not typically available. If you can put the animal in your vehicle with the air conditioner on, take him or her to the vet ASAP, where professionals can treat heat stroke or other ailments the animal could be suffering from as a result of overheating.
Know your local laws before you encounter a situation that requires immediate action and you'll know what you're dealing with. The Michigan State University College of Law has compiled a table of state laws that shows what each state will legally allow you to do. In some states, you are immune from civil liability when rescuing an animal. In others, only law enforcement and animal control officers can legally break into the vehicle. Furthermore, some states have NO laws concerning the situation.
Whatever you choose to do, please don't allow animals to needlessly suffer at the whim of humans.
 Stanford University School of Medicine: Parked Cars get Dangerously Hot even on Cool Days, Stanford Study Finds
 Michigan State University Animal Legal and Historical Center: Table of State Laws that Protect Animals Left in Parked Vehicles
 Infographic provided by Figo Pet Insurance