In Illinois, neither headphones nor riding on sidewalks is illegal. Local municipalities (I think) may trump state law, but a number of communities (like mine) simply do whatever state law states.
http://www.ilga.gov/legislation/ilcs...ehicle+Code%2E
I had checked with my local police department before starting my commute and they confirmed that they do not consider headphones while riding a bicycle to be illegal, although there are obvious safety concerns that you need to be aware of.
Just one more data point from the NW suburbs of Chicago...