For something mechanically and electronically simple as a keyboard, there aren't many hazards. However, as keycaps are removable, there would be a choking hazard for small children should any keycaps come off the board.
Failure Methods
A keyboard can fail in a few different ways. Mechanically, a switch or keycap can break or wear down, causing it to perform incorrectly.
Additionally, if an object got under the keys, it could cause the keys to move or lock up when pressed, causing a break in the switch's stem
Electronically, there could be a short, causing the logic board to "brick" or cease functioning.
This could be caused by a liquid spill, a mistake on soldering, or by physical misuse, such as jamming the usb port or dropping the board.