When the police pull your car over, you have certain rights that the police, by law, cannot infringe upon. The U.S. Constitution provides the precedent for most of these rights, including what the police can search.
A police stop is stressful enough, but when an officer requests to search your vehicle, do you have the right to say no? The civil liberties the law grants say that the police may only search in certain situations.
Is there something they can see?
Part of the purpose of a vehicle stop is observation. The police can also use the time talking with you to look at whatever you have in plain sight. If they spot something that may lead them to believe you have committed a crime, they have the right to enter your vehicle and take it.
Do they believe there is an emergency?
The police may claim an emergency, and they need to search your vehicle. For instance, if a person has gone missing in the immediate vicinity or a crime involving a weapon, they may stop cars at random to conduct searches.
Are you under arrest?
If the police believe they have evidence of a crime before searching your vehicle, they may arrest you. After the police read you the Miranda warning and explain why you are under arrest, they may search your body and immediate area. This may not extend to the vehicle you were in since they have removed you from it, and a dangerous situation no longer exists.
If the police ask you to search the car, you do not have to give them access. You should comply with their requests as long as they are well within the parameters of the law.