A 25-year-old man has appeared in court accused of punching a pensioner and stabbing her in the chest in an unprovoked attack.