Out of universe
Because the people who made the movie thought it looks cool.
Plus all the production reasons given here.
In universe
Talking about coolness, Neo didn't use to wear sunglasses when he wasn't free. How come his mind started to project sunglasses all of a sudden?
Because he thinks it looks cool.
Agent Smith puts it best.
It seems that you've been living two lives. In one life, you're Thomas A. Anderson, program writer for a respectable software company. You have a Social Security number, you pay your taxes, and... you help your landlady carry out her garbage. The other life is lived in computers, where you go by the hacker alias Neo, and are guilty of virtually every computer crime we have a law for.
Thomas Anderson, playing by the Matrix's rules, is a talented young man forced to conform. Yet he's unsatisfied and searching for something more. Trinity says...
I know why you're here, Neo. I know what you've been doing. I know why you hardly sleep, why you live alone, and why night after night, you sit at your computer.
Once freed, again Agent Smith puts it best.
One of these lives has a future, and one of them does not.
His persona as Thomas Anderson was a product of his environment, The Matrix. He hated his job and always felt out of place. Once freed, he sheds that persona and becomes his more natural persona: Neo. And he changes his style to match.