Jack Brooke punched the 81-year-old man several times at around 1.30pm on Thursday 22 October.
Both men were walking alone near Bridge Foot until they came face-to-face between St Marys Street and Miller Street.
As the victim tried to side step around the 22-year-old, he grabbed hold of him, raised his fist and struck him two or three times to the head.
The attack caused the victim to fall to the floor onto his knees and Brooke walked away into the town centre.
Following the assault the gentleman attended Warrington Hospital a few days later after his injuries, involving a bruised ear and repeated headaches, became more painful.
He then told his family what had happened and they reported it to police.
Officers launched an investigation and appealed to the public for information on the attacker.
It resulted in a number of people coming forward including a cyclist who went to the man’s aid shortly after the attack.
Once identified, Brooke was arrested at his home address on 28 October and taken into custody. He was questioned by officers and subsequently charged.
In the victim impact statement read out in court, the victim said he still replays the attack over and over in his head and has suffered flashbacks of Brooke’s fist coming over him.
Sergeant Chris Webster, from Warrington Local Policing Unit, said: “I will never understand why Brooke chose to repeatedly punch an elderly man who was simply walking past him on a street.
“The attack has understandably had a significant impact on him physically but also mentally and also shocked the local community.
“Before Brooke’s assault the victim would regularly go for long walks without a care in the world. I only hope this doesn’t deter him from continuing to do this.
“I want to thank the victim for having the courage to come forward and to the public who provided us with information to ensure justice was served.”
Brooke was sentenced to 18 weeks at Warrant Magistrates Court on Wednesday 24 February.
He was also sentenced for a separate offence of criminal damage after breaking the window of a property on Whitefield Road in Warrington in August.
Brooke picked up a plant pot and threw it at the living room window causing between £2500 and £3000 of damage.
David Keane, Police and Crime Commissioner for Cheshire, said: “It’s despicable to target some of the most vulnerable people in the community.
“I hope the victim is able to overcome this ordeal and return to his daily walks.
“I want to thank the public and the officers for ensuring this man has been brought before the courts and punished for this shocking attack.”