According to Variety, Lehrer was classically trained in the piano and started Harvard at age 15. He graduated Harvard magna cum laude in 1946. He taught at Harvard, MIT, and Wellesley, and in 1951 wrote some songs for a Harvard musical revue.
A fan of musical theater, he recorded his own album and it sold on college campuses in Boston. After a stint in the army and, apparently, the NSA, he released a second album and a third which was also recorded live at Harvard as An Evening Wasted with Tom Lehrer.
In the 60s, he wrote songs for a TV program called That Was the Week That Was, and released another album (earlier albums were being re-released on Reprise, so he was gaining traction). That Was the Year That Was is kind of scary when you realize it was written for the problems of 60 years ago, yet nearly all of it perfectly relevant to right now.
He wrote some songs for the PBS educational program Electric Company and even appeared at fundraisers for the George McGovern presidential campaign in '72.
Later (Lehrer was Jewish), he wrote and recorded Hanukkah in Santa Monica.
As Variety notes, "Lehrer influenced the work that came later from such musical satirists as Randy Newman, “Weird Al” Yankovic and Harry Shearer." I would add the late political satirist Mark Russell to that group.
Here's some notable stuff, in more or less chronological order.
So Long, Mom (a Song for World War III) from That Was the Year That Was (1966)
Silent E from The Electric Company (probably 1971 or 1972)
And finally, Hanukkah in Santa Monica (1990s?)
Lehrer was 97. Please feel free to add your own beloved songs and memories. My parents used to go to his concerts when they were dating, so my brother and I kinda owe our existences to Lehrer.