Yes, it should be illegal to leave children in a car by themselves. Children, especially very young children, should never be left alone because they are unable to care for themselves and may injure (or worse kill) themselves without supervision. In a car, a child may overheat if left alone in a vehicle in a hot day.
Leaving children in a car by themselves should be illegal. Leaving a child unattended in a vehicle is no different than leaving them unattended anywhere else. A vehicle is a dangerous place for a child, given the possibilities for disaster. Leaving a child unattended in such a way is neglect and endangerment.
Responsible parents care for and watch over their children's behavior and their safety. Leaving your child in the care while you walk in to pay for your gas or buy a bottle of water is a common sight. In today's America, danger is more prevalent than in years past. Having your car stolen or your child from your locked car while you are not present happens more often than most like to admit.
What about if you run into the store "real quick"? Leaving your child belted into a car seat is not a particularly responsible act on the part of a parent. In the summer, heat exhaustion can overtake a young child very quickly and in the winter, the cold will cause hypothermia much faster than in an adult.
Stiff penalties for irresponsible and thoughtless parents just may prevent needless death and injuries to innocent children.
Whether or not a child can be left in a car by themselves safely depends on a number of factors - The age of the children, their maturity level, where the car is located and the weather outside are all part of the decision. It might be perfectly reasonable to leave a 12 year old in an air conditioned car in full view of the windows of a convenience store for a few minutes, but it would be hard to argue that leaving an infant in a hot car in a crowded parking lot for a half an hour is safe. Trying to enforce that it is illegal to leave a child in a car at any time for any reason at all would be difficult and at times irrational - It is much better to let the circumstances dictate whether or not it constitutes neglect, and lay charges on those grounds.