Colic is always a possible cause, however it is pretty normal for babies to experience crying as stomach pain is inevitable. It could also be the formula milk the baby is drinking, trying lactose free formula may be a solution.
Same thing happened with my son. Ended up being reflux. He would try and eat and would come off the breast crying and arching his back. It's worse when they lay flat because it's easier for the acid to back up into the esophagus. Can't remember the name of the medicine we got from the pediatrician but it helped within a few days.