Bookworm is an intelligent worm toy with a built-in flashlight.
He keeps a "library" of sorts in a closet at Sunnyside Daycare which holds instruction manuals for many different toys, including Buzz Lightyear. He gives Lotso a manual to reset Buzz, allowing Lotso to make Buzz one of his cohorts (as well as returning Buzz to when he thought he was a real space ranger in the first Toy Story movie).
Later, after Woody returns to rescue his friends and bring them back to Andy's house, Bookworm is seen again and against his plea to wait until morning, handing "Spacesuit Ken" (unaware that it's really Barbie in disguise) a Buzz Lightyear manual, he reacts with disgust when he discovers that "Ken" is actually wearing pink high heels.
After Lotso is expelled from Sunnyside, it is highly implied that Bookworm has been convinced of Lotso's termination, so he reforms, as with the case of the other Sunnyside toys who have previously served Lotso. During the film credits, Bookworm is seen happily using his flashlight to illuminate a disco ball when a disco party is being held in the Butterfly Room.
Bookworm appears to have been based on the Glo Worm toys of the 1980s.
Lotso seems to dislike Bookworm to some extent. After Bookworm tosses Buzz Lightyear's manual at Lotso’s feet, the latter gives him a somewhat disapproving glance. This could imply that Bookworm did not enjoy being a part of Lotso's gang and adhered to his orders only out of fear or coercion. It is subsequently possible that Bookworm did see through Barbie's disguise, but did not want to tell Lotso.