The lawyer for the 9-year-old boy who surrendered after the robbery of a midtown Manhattan bank last week said yesterday that the boy was influenced by crime programs on television and that he was only playing when he pointed a toy gun at a teller at the New York Bank for Savings and demanded money.

The lawyer, Mel A. Sachs, said the suspect, whom he called Robert, ''didn't have any intent to rob a bank.'' ''This was an act of a 9-year-old child,'' Mr. Sachs said, ''and I don't believe that he understood what he was doing. It's ridiculous and absurd that a child of this age could contemplate the intent to perform a criminal act.'' Robert surrendered on Friday.

Mr. Sachs said Robert is not a mean child or a troublemaker. He said that Robert's parents are separated and that he lives with his father and paternal grandparents in their Manhattan apartment. Robert, he said, entertains himself by watching television - a habit that will be crucial to his defense. Constantly Watches TV

On Tuesday, the day before the robbery, Mr. Sachs said, Robert had spent hours watching ''Adam 12,'' ''The Rockford Files'' and ''Hogan's Heroes.''