In Washington, a police officer may direct a driver (that’s you – probably) to step out of the vehicle, even for an infraction. The Supreme Court has held that such a request is a “de minimis” violation of your Fourth Amendment rights, and is therefore allowed.
However, in order for a request to exit the vehicle to be constitutional, the scope of the detention (a driver is technically detained during a stop) must be justified by the circumstances. Thus, an officer can’t issue a ticket and then pat someone down, but can pat down a driver during the course of the stop if the officer believes the driver may have a weapon.
The rule allowing police to order a driver out of the car does not apply to passengers. To order passengers out, the officer must be able to articulate an objective rational predicated on safety concerns. This is a fancy way of saying that to order a passenger out of a car, the officer will have to show that he or she did it to maintain safety, and have a good reason for doing so.