This might be what is called a "pretext" stop - a stop for some ostensibly valid reason but the real reason is one for which the officer had no justification or probable cause. If so, your Fourth Amendment rights may have been violated. What you don't say, however, is what happened after that. If you were arrested for some offense stemming from this stop, you may be able to move to dismiss the case on this basis. Or, if the officer searched you or your car and seized actual evidence (for example, drugs or a weapon), you may be able to suppress that evidence based on the imporper stop. But this is a difficult area of the law and the case needs to be looked at much more closely to determine if it was immproper.
If you were not arrested or cited, and/or did not have anything taken by the police as a result of the stop, then you essentially have no remedy since you suffered no prejudice as a result of the improper stop. Just to be safe, you might want to turn your music down from now on, or at least roll up your windows to prevent this from happening in the future....
An officer cannot legally stop a driver unless he or she can substantiate a specific and just cause to believe there has been a traffic infraction or other violation of law.
Pursuant to the 4th Amendment of the U.S. Constitution, every citizen has a constitutional right against unreasonable searches and seizures. This means that the police cannot stop your car or order you to pull over unless they have a reasonable suspicion that you committed or were about to commit a crime. There are certain times, however, when the police can in fact make a random stop that may seem unreasonable to you.
Disclaimer: This answer is provided as a public service and as a general response to a general question, it is not meant, and should not be relied upon as specific legal advice, nor does it create an attorney-client relationship.