For my daughter, she sucks on her thumb really hard when she's hungry, so that's how I know.
Babies put toys in their mouth because they are curious and using their mouth to explore is one of the ways they learn about the object.
They will also cry to alert you if they are hungry. If you really can't tell, feed your baby every 3 hours.