State laws differ on whether it is against the law to leave a vehicle unattended while running however Maryland is one state that does have a law on the books making this a traffic violation so you could get cited by police.
According to the Montgomery, Maryland Police Department, leaving a car running and unattended on a public street, highway, or public parking area is a violation of the State of Maryland Vehicle Law, Article 21 Section 1101 (a).
The penalty for violation of this MD law is a $70 fine and one point on your driving record. The Maryland Vehicle Law requires that a driver turn the engine off, lock the ignition, remove the keys, and set the brake before leaving a car.
If your vehicle is stolen with the use of a key, it could result in sanctions by the vehicle's insurer. These penalties can range from a premium increase to failure to renew the policy. Likely your stolen vehicle would be covered however you will be found to be negligent in the situation so that is why your insurer could bring sanctions against you.
Insurance companies' policy terms do differ though so if your specifically states that your car is not covered if left unattended and running or with the keys in the ignition, making it a target and easy for a thief to take, than your Comprehensive claim for your stolen vehicle could be denied.