Too often, greatness is determined by whatever definition supports the person's opinion.
America has many factors in its favor to be called "great".
Our natural resources, natural boundaries, sea ports on 2 coasts, variety of climates, attraction to immigrants wanting to flee oppression, and capitalistic society that rewards hard work and innovation helped make us great.
If you only judge the US on its methods, then of course, by today's standards, the morality of many of the government's decisions were lacking. But when you judge us on success and the willingness to share that success with the rest of the world, there's no one else that comes close.
Military might, technological advances, medical discoveries, highest standard of living for everyone including the poor, infrastructure, advancement opportunities regardless of "economic class", education, environmental protection remedial actions (smog control, litter, clean water, etc.), health and safety in the workplace, civil rights, ... It's difficult to point to another nation that's exceeded the US in all those areas.
The US is a relatively young nation. For us to have gone from a colony to the leading Super Power on the planet in less than 2 centuries is quite an accomplishment.