Found this online:
In the book Neil Young: Long May You Run: The Illustrated History, Stephen Stills tells the story of this song's origin:
"I had had something kicking around in my head. I wanted to write something about the kids that were on the line over in Southeast Asia that didn't have anything to do with the device of this mission, which was unraveling before our eyes. Then we came down to Sunset from my place on Topanga with a guy - I can't remember his name - and there's a funeral for a bar, one of the favorite spots for high school and UCLA kids to go and dance and listen to music.
[Officials] decided to call out the official riot police because there's three thousand kids sort of standing out in the street; there's no looting, there's no nothing. It's everybody having a hang to close this bar. A whole company of black and white LAPD in full Macedonian battle array in shields and helmets and all that, and they're lined up across the street, and I just went 'Whoa! Why are they doing this?' There was no reason for it. I went back to Topanga, and that other song turned into 'For What It's Worth,' and it took as long to write as it took me to settle on the changes and write the lyrics down. It all came as a piece, and it took about fifteen minutes."