In your User's Library/Preferences, delete these files.
~/Library/Preferences/com.apple.imessage.bag.plist
~/Library/Preferences/com.apple.imservice.ids.FaceTime.plist
~/Library/Preferences/com.apple.imservice.ids.iMessage.plist
Log out under the Apple in the Menu bar.
Log in and setup Messages.
If this fails, Create a test User in System Preferences. Log into the test user and sign in with your iCloud account. Does messages work in the new User.
The User's Library folder is hidden by default. To unhide: Select the Finder in the Dock. Under Go in the Menu bar > hold down the Option key and you’ll see the Library.
Finding the User Library Folder
http://www.takecontrolbooks.com/resources/0167/site/chap11.html#FindingtheUserLi braryFolder
CREATE A NEW USER
Go to System Preferences --> Create a New User in Users & Groups
Switch to the New User by logging out under the Apple in the Menu Bar.