For a few reasons:
The United States had suffered almost twenty years of turbulence and tragedy. You had JFK murdered in 1963, which traumatized a whole generation. You had Martin Luther King, Malcolm X, and Robert Kennedy also murdered, which further traumatized the nation. You had the Vietnam War, which killed thousands of young men, which broke their family’s hearts, and ruined the lives of hundreds of thousands of other young men who served and were wounded or became addicted to drugs during or after the War.
You had race riots, thousands of bombings every year for almost a decade, cities engulfed in flame and smoke.
With the death of Kennedy came LBJ, who while a great President in terms of domestic legislation, was a liar and a crude man who misled the nation into the aforementioned war. The Pentagon Papers showed that every President from Eisenhower onward had lied to the public about Vietnam. Following him, you had Nixon, a creepy son of a bitch who violated and utterly destroyed the nation’s trust in the Federal government.
You had gas lines, a lost Vietnam War, and beginning in the mid 1970s, chronic economic unease. You had the rise of other nations which helped lead to the beginnings of the Rust Belt. All of these things dealt body blows to the nation’s morale. We were becoming a second-rate power. We couldn’t even defeat “primitive” guerrillas in a war.
The WWII Generation looked broken-hearted as the dreams they had for their children during the prosperity of the 1950s faded away and a generation gap grew. They looked with lukewarm acceptance of civil rights, only to see the passage of paternalistic Civil Rights Acts met with rioting (from their POV). They saw the death of the mores they were raised to believe happen virtually overnight.
The Baby Boomers threw themselves into idealistic revolutions and dreams of their own utopias, which, like their parents’, died a death. The Communes dried up, the Hippies cut their hair, and with cynicism and a bleak looking future ahead, went to work. Altamont was a tragedy, John Lennon was killed, the leading Hippies became Yuppies, and the dreams of the Love Generation were lost.
The lovable but ineffective Jerry Ford followed the dark and dour Nixon and the crude and misleading Johnson. The humble but incompetent peanut farmer named Carter from Georgia followed him.
Into all this came a handsome, charismatic, smooth talking man who oozed confidence. A simple man who had a deep faith and love of America. A man who promised to make America strong and respected again, who told us we were not in a rut, but on the verge of a new morning. This was a man who copied Nixon’s playbook which had attracted older and young centrist Democrats - without having Nixon’s swarthyness or creepiness. This was a man who told us we did not need to fear that tomorrow would bring a nuclear apocalypse - we would win. Communism would be at the ant heap of history. This was a man who invoked the imagery of the Cowboy. He also invoked nostalgia for the Golden Age of Hollywood (and with it, the perceived Golden Age of America). He was classy and sharp, with a pretty wife.
He cut taxes, and while trickle-down led to long-term issues, in the short term, it led to a massive economic boom. We went from being on the verge of a second Great Depression, to having prosperity on par with the Roaring Twenties. During his term, you had the Personal Computer boom. You had great blockbuster movies coming out every year, which only helped to increase the growing sense of optimism (compare them to the gritty, dour, depressing films of the 1970s). These were not Reagan’s doing, but they were part and parcel of the era in which he governed.
Reagan is viewed as a great President because he was a great leader. I don’t agree with his policies. But like his idol, Franklin Roosevelt, he had amazing communicative skills. He was able to uplift a depressed and downtrodden nation with his promises of “Morning in America.” He’s viewed as great because it seemed that under him, America had turned from the turbulence and dreariness of the 1960s and 1970s back to order. He’s viewed as great because he seemed to be the first President who was a true leader and inspirational figure since JFK. Even on their best days, LBJ, Nixon, Ford and Carter were not inspirational men. He’s viewed as great because he was able to use the media to his advantage; he was able to sell events which would’ve happened without him as being his doing. He’s viewed as great because not only were the men immediately before him mediocre, but the men who followed him were similarly mediocre.
Reagan is basically Hollywood. He was style, not substance. We had had substantive Presidents in Lyndon Johnson and Richard Nixon - brilliant, intellectual men whose flaws wounded America. America wanted style. America wanted to feel good again, even if it was just superficial. We needed hope; we needed inspiration. Reagan brought those to a nation that needed it.
His policies sucked, but his image and ability to comfort the country did not.