You get pulled over by the police. The officer walks up to the window. When can the police look inside your car during a traffic stop? In general, the 4th Amendment to the US Constitution protects you and me from unreasonable searches and seizures. That is not, however, the end of the story.
Right to Stop
Under Texas law, an officer must have reasonable suspicion that you've committed a crime in order to pull you over. Reasonable suspicion is not a very high burden (it's certainly not beyond a reasonable doubt or even probable cause), but it's more than an a mere hunch or no legal reason at all. The officer must have some minimal level of justification for making a stop. This means that an officer must be able to “point to specific and articulable facts, which taken together with the rational inferences from those facts, reasonably warrant the intrusion.”
Plain View Searches
When an officer has a legal right to be where he's standing, he has the right to look at anything that's within plain view of his location. In a traffic stop, if the officer had reasonable suspicion to pull you over, then the officer has the right to be standing next to your car on the side of the road (for instance, asking for your license and insurance, et cetera). Whatever the officer can see in plain view from standing outside your car will be fair game. The key here is what's in plain view. On the seat for all to see would definitely be plain view. In the floorboard may or may not be plain view depending on the layout of the car and where the item is on your floor board. Under your seat, in the center console, or in the glove box is obviously not plain view. The officer is, by the way, allowed to use his or her flashlight to illuminate the inside of your car.
Probable Cause to Search
If the officer is going to do more than a plain view look from outside the vehicle, that's a search and he must have probable cause. What does "probable cause" mean? Essentially, it's when the officer has “reasonably trustworthy information” sufficient to warrant a reasonable person to believe that a particular person has committed, or is committing, a criminal offense. Say you match the description of the bank robber they're looking for and a bag of money is spilling out on the floorboard or you're pulled over on suspicion of driving while intoxicated and have blood shot eyes, slurred speech, and the strong odor of alcohol coming from your breath. If the officer has specific and articulable facts that lead to probable cause, he has the right to both search and arrest.
Even an otherwise illegal search is made perfectly legal if you agree to it. This makes it very important to stand up for your rights and (politely) do not agree to a search. If the officer asks, "do you mind if I search the vehicle," a "yes" answer erases any argument you have that he didn't have the right to search. Officers sometimes get creative with this question, asking things like "do you have anything I need to know about" or "you don't mind me taking a look in your car right?" Remember, you never have to consent to a search. Politely yet firmly say "no sir/ma'am" to any request to search. You may not stop him from searching, but if you politely refuse to give your permission to search, your lawyer may still have an argument to fight an illegal search.