easy solution for everyone to use that will most likely help 90% of the people here. delete ur entire music library.
i know it sounds scary, but if u do it will then give u the option to "scan for media". that will tell ur itunes to scan ur entire computer for the music on it and it will re-add all of the music back into the itunes. the reason u want to do this is because ur music is not stored in itunes. it is stored in files on ur computer and ur itunes only shows links to those files. if, for whatever reason, ur music file(s) move, change name, or is deleted, that will break the link in ur itunes but ur itunes wont know it until u try to play that particular song.
my method of just deleting the entire music library, keeping files on computer (do not "move to recycle bin" when it prompts u), and then scanning for media will refresh the entire library without the hassle of individually tracking down the broken music. u will have to redo ur playlists but that is the only drawback to this method. after u have done this ur music should be syncing over to ur devices just fine. if it is not then u have officially ruled out ur music being the cause and can troubleshoot from there.
another thing, if u have itunes purchased music u might have to hide store purchases to see the scan for media option. to do this go to ur itunes preferences>store>uncheck show itunes in the cloud purchases. u can check that box again when ur done.
another thing #2. to clear up some general confusion ive noticed. if ur song has a cloud next to it in ur library, that means that u have the show itunes in the cloud purchases turned on and u are looking at a song u have purchased but is not actually downloaded onto ur computer. click the cloud to download it. if it does not have a cloud next to it that means it IS on ur computer. music that is not on ur computer will not sync to a device.