I need a chess library or simple chess engine code that is written in C that allows me to play chess on Arduino Uno serial monitor.
As per my answer to this question (sometimes it's better to search before asking ;-)
You appear to be seeking Toledo Nanochess.
With only 1257 non-blank characters, Toledo Nanochess is the current world's smallest chess program in C language.
Doing it over serial port is left as an exercise for the reader :-)