Hi,
There can be several causes and reasons for this.
NVRAM (PRAM) resets are a good start.
Safe Boot is also good.
Can you go to the Apple Icon Menu top left and use the About this Mac option.
In the Overview tab the Serial Number should be seen.
This is used in a Device Specific Login to the iMessages server (along with the Apple ID and Password)
Is it showing ?
If it is go to Applications/Utilities and open Keychain Access.
Select "Login" top left if it is not already.
Select "Passwords" Lower left.
On the right hand side look for
IDS: YourAppleID-Auth Token
The "YourAppleID" should be the emails used as your Apple ID in iMessages.
Delete this item but leave Keychain Access open.
Restart Messages and try to login again.
Is the IDS item recreated ?
If not then open a Finder window and use the Go Menu whilst Holding down the ALT key.
Select the Library and then navigate to Preferences.
Find these two items:-
com.apple.imessage.bag.plist Holds the last server iMessages was connected to.
com.apple.ids.service.com.apple.madrid.plist Holds the Apple ID and any alternatives listed in the app.
Restart Messages (both will be recreated if it works).
Does it work ?
This is about as much as you can test/do with your own Mac User account and the one Apple ID
If you have access to another Apple ID try that.
Does that work ?
In System Preferences > User and Groups you could Enable the Guest account or specifically create an Mac User account for testing.
Login to that Account
Set up iMessages with your normal Apple ID
Does iMessages account Login properly ?
If it does we will have to look deeper at your normal Mac User account.
If it does not it is likely that the Apple ID has become blocked at the iMessages server level (it's a security feature that is supposed to stop people pretending to be you - based on the Device Specific login - but for some it gets triggered when it should not be but there is no reset on the Mac end.
Post back at this point as the details for the "Fix" are log winded and this posy is long enough already.

9:42 pm Thursday; September 1, 2016
iMac 2.5Ghz i5 2011 (El Capitan)
G4/1GhzDual MDD (Leopard 10.5.8)
MacBookPro 2Gb (Snow Leopard 10.6.8)
Mac OS X (10.6.8),
iPhone and an iPad (2)