In general, police must have a reasonable, articulable suspicion that a violation is being or has been committed in order to pull someone over. There are exceptions to this requirement and may apply to your circumstances. One exception that commonly occurs is when the police perform a VEIP stop. This is where a check is run to determine if the vehicle's registration is suspended for failure to have the required Maryland vehicle emissions inspection performed. Failure to do so results in the suspension of the registration for the car and the license of the car's owner and gives the officer a reason to make a stop.
A police officer cannot pull you over for no legitimate reason, to answer your question directly. An officer on foot, however, may approach you to engage in what is called an accosting, to either inquire about you or investigate, but one does not have an obligation to consent to the interview and can walk away. Concerning a car stop, officers can pull you over for criminal/traffic reasons, but they have to be based on reasonable articulable suspicion that criminal activity is afoot, or probable cause that a crime is being or has been committed (or based on a warrant for your arrest, of course). However, a police officer may even briefly detain you for non-criminal reasons such as community caretaking (medical emergency and etc.), but only to assist you or help you get medical treatment. See a recent case on this issue called Maryland v. Wilson, that I argued at CSA. It is intriguing that the officer could identify that your license was suspended from simply tracing your tags, in your example. Unless the officer knew you personally and could identify you...?
Displaying a license plate in the state of Maryland is probable cause for the cops to run the plates. If they see a violation (emission, inspection, dead tags, etc.) then they can initiate a stop.
In other words, they can't stop you and run your plates, but they can run your plates and stop you if they find a violation.
Read the first link below and you'll see that cops are encouraged to use license plates as a tool for crime detection.
Having any sort of problem with the MVA- suspended license, dead tags, improper plates, no insurance, inspection/emission expiration - all of these provide a very easy way for cops to pull you over. Once they do that, if there's anything in plain view (or plain smell - and sometimes in not-so-plain smell*) then you've got problems.
* - I had a case once where the officer claimed to smell the odor of marijuana coming from a car with an open sunroof going 60 mph down B-W Parkway. Still got convicted...