This is really a hard question to answer. So, I am going to cheat and give you four answers, because I think each played a vital part in our history.
First, there is Thomas Jefferson. He was a brilliant man, who doubled the size of the country, wrote the Declaration of Independence and help to establish the stability in the Presidency started by Washington, continued by Monroe and then by Jefferson.
Next would be Abraham Lincoln, who had the monumental task of preserving the union. He took some extraordinary steps to do it, but I think the means did justify the end.
Moving to more modern times, I am torn between FDR and Harry Truman. FDR did use the War to bring the nation out of the depression and called for the development of the Manhatten Project. it was Truman who ordered the dropping of the Atomic Bomb and as horrible as it was, it has probably been the biggest deterrent to nuclear war we could ever have. Based on the bombing of Japan, no national with nuclear arms could think that there could ever be a victory.
Finally, I chose John Kennedy and the 1,000 days of Camelot. Kennedy had his flaws, but we did not learn that until later. During his short presidency, he set goals for this nation, put a man on the moon, enact Civil Rights legislation and help the needy in other countries through the Peace Corps. Lyndon Johnson had to finish some of those tasks, but the tone was set by Kennedy. His goal of putting a man on the moon, is without the catalyst that produced our computerized lifestyles and has given us so man conveniences, tools and opportunities.
I apologize for picking more than one, but when comparing presidents over a 200 year period, picking the best becomes more difficult.