Hanks wrote, directed and starred in the comedy drama, and revealed that he enjoyed the opportunity to let Roberts let loose in the role of alcoholic Mercedes Tainot.
"You haven't hung around with her," Hanks told E! Online, when asked why he chose Roberts for the part.
"Look at the way this woman makes a margarita!" he explained. "That's a different sort of drunken school teacher. There's stuff behind that."
Roberts also admitted that she relished the opportunity to play such an outrageous and different character.
"It's the most fun thing anyone has asked me to do on camera," the actress added. "Play drunken school teacher. Isn't that awesome?"
Hanks recently admitted that he had been initially intimidated by the idea of working with Roberts on the project.
Larry Crowne follows a middle-aged man who enrolls at community college in an effort to launch a new career.
The film also stars Breaking Bad lead Bryan Cranston, Cedric the Entertainer and former Star Trek actor George Takei.
Larry Crowne is due out in cinemas in the US and the UK on July 1.