Music can influence people's political view mainly because it's immediate. It can draw attention to particular issues and encourages people to learn more about them.
Probably people would have learned about the same issues reading a book or watching a tv program, but those kind of books and tv shows are often addressed to a specific audience already interested on those matters. On the other hand, anyone can turn on the radio, hear a random song about politics or social issues, become interested in those problems and then learn more about them.
Since American Idiot has already been mentioned, I'll try to make another example: there's a famous Italian song that denounces the compliance between State and mafia, and this line
"And what does the State do? It's sorrowful, indignant, does its best, then throws in the towel with dignity"
perfectly describes politicians attitude towards the whole mafia thing. At first I didn't really get what the songwriter was trying to say, then I payed attention to the way politicians deal with such a problem: officially they condemn it but at the same time they don't really do anything to effectively stop mafia affiliates' activities, they seem to consider it a secondary problem of this country.
In short it basically encouraged me to be more critical, to not trust everything politicians say and to be more informed on the matter.