Officials say two men left El Tarasco on Main Street on Monday.
As they drove away, Michael Wessel fired a shot toward the restaurant, police said.
No one was hurt. Officials say the bullet hit a parked car and the building.
On Tuesday, investigators found Wessel driving near Caldwell and Linwood and took him into custody.
Detectives later found the gun used in the shooting at a home in Visalia. Police are still working to determine a motive.
Anyone with information is asked to call the Visalia Police Department.