The Supreme Court has already weighed in on this common traffic-stop question.

In today’s world, knowing your rights during a traffic stop is just as important as knowing the rules of the road. But if a police officer asks you to step out of your car, do you actually have to comply?
The answer comes down to one important distinction: a request isn’t necessarily the same as an order. If an officer politely asks, “Would you mind stepping out of the car?” you generally aren’t committing a crime simply by declining. But if the officer orders you out during a lawful traffic stop, refusing can potentially result in arrest or other charges under applicable state or local law.
No laws are being broken when an officer politely asks, “Would you mind stepping out of the vehicle, ma’am?”
The U.S. Supreme Court addressed this issue in Pennsylvania v. Mimms, 434 U.S. 106 (1977). The Court ruled that police may order a driver out of a vehicle during a lawful traffic stop, even without additional suspicion that the driver is involved in another crime. Pennsylvania v. Mimms
The rule was expanded to passengers in Maryland v. Wilson, 519 U.S. 408 (1997).. That decision confirmed that officers can also order passengers out of a vehicle during a lawful traffic stop. Maryland v. Wilson
The reasoning behind both decisions largely centers on officer safety. A traffic stop puts an officer next to an occupied vehicle without necessarily knowing who is inside or whether anyone poses a threat. Requiring occupants to step outside gives the officer greater control over the encounter.
This assumes, of course, that the officer has already lawfully stopped you for a traffic violation or conducted a Terry stop. In the United States, police generally need reasonable suspicion or probable cause to initiate a traffic stop, with certain exceptions such as traffic-safety or DUI checkpoints, which operate under their own rules. Once a lawful stop has been made, however, the officer can direct the vehicle’s occupants to step outside, and refusing a lawful order could potentially result in criminal charges.
Christopher Hawk is a retired police officer who spent 23 years with a police department in Illinois. During his career, he helped rewrite departmental policies and training programs covering community policing, traffic enforcement, and DUI enforcement. The State of Illinois recognized his work in DUI enforcement, and he served as a Field Training Officer for 20 years. He also spent 13 years as a Police Cyclist Instructor with the International Police Mountain Bike Association. Hawk now lives in Ohio, where he drives a school bus and works on his vintage Volkswagen Type III Fastback.