"Word" comes from the english saying "my word" which in turn comes from "I give you my word". Meaning that a statement is right and you would be willing to put your honor on the line to back it up.
Once again, this comes from "my word". When one says "word" as if asking a question, he or she is asking if the person that made the statement would swear to it.
Person 1: "Man having chapped lips is annoying."
Person 2: "Word." (meaning I agree and I would swear to it)
person 1: "I had corn for dinner last night!"
Person 2: "Word?!" (meaing would you swear by it)
"Word?" ("You speak the truth?")
"Word." ("I speak the truth.")
"Word" has no single meaning, but is used to convey a casual sense of affirmation, acknowledgement, agreement, or to indicate that something has impressed you favorably.
Its usage among young blacks has been parodied ad nauseam among clueless suburban whites.