I'm sure there are rankings out there, but those tend to be both subjective (i.e., depends very much on the specific weighting factors the rankers chose) and "top-heavy" in the sense of listing a lot of the well-known and extremely expensive private schools.
In general, though, most of the large state schools will tend to have good programs, simply because they're large enough to employ quite a few faculty in the astronomy/astrophysics department. I went to the University of Minnesota, for example, and their directory currently lists over two dozen professors, though at least four or five of them are emeritus: faculty">https://www.astro.umn.edu/directory/faculty (most of the latter were my professors back in the day :-) ).
Another good indicator is an active research program with one or more telescope facilities, either ground-based or in space. The University of Hawaii has access to a bunch of world-class scopes on Mauna Kea, for example; U Arizona is associated with Flagstaff Observatory; U Texas Austin has the MacDonald Observatory; UC Santa Cruz operates the relatively smaller Lick Observatory; Johns Hopkins operates the Space Telescope Science Institute, IIRC; I believe the University of Washington and Lousiana State operate the two Advanced LIGO gravitational-wave observatories; U Wisconsin apparently operates the IceCube neutrino observatory in Antarctica; etc. There are also all-sky surveys like SDSS, 2MASS, the Dark Energy Survey (DES), and the European Gaia mission that are collaborations of many organizations and that produce ginormous quantities of astronomical data; a school could be associated with one of these projects (several of which involve multiple observatories) but not directly with an observatory, at least in principle. Googling some of these big projects and then seeing which universities are directly involved with them is another way to find good candidates.
And I haven't mentioned some of the smaller and/or older space-based projects, but there are multiple probes on or in orbit around Mars; the Parker Solar Probe just launched and will be slowly making its way closer (much, much closer) to the Sun; Juno is still orbiting Jupiter; Kepler/K2 and TESS are staring at stars that may host exoplanets; New Horizons is on its way to a second trans-Neptunian object; there are at least two or three probes sniffing and/or poking around asteroids and comets; etc. You may not hear much about some of these in the news, but they're all still producing new data and new discoveries, and there are many researchers working on each of them. (I worked as an undergrad with a U of M professor on the Dynamics Explorer satellites, which investigated the Earth's magnetosphere back in the 1980s.)
So that's a roundabout way of giving you some indirect pointers on how to find good candidate schools without actually doing all of the searches myself. :-) I could spout some names that were considered good when I was in school, but that was decades ago, and things have changed since then. Maybe somebody whose knowledge is a little fresher will follow up.
Greg recommends the following next steps:
I majored in Astrophysics at UC Berkeley (2020 grad). I wasn't planning on studying astro when applying to colleges so I can't really speak to other universities' programs but I can tell you about my own experience:
A common career for those wanting to go into astronomy/astrophysics is research (which basically means doing higher education). I felt that the undergraduate program at Berkeley focused more on establishing a good foundation in things like physics, math, data science, and computer science, over pure Astronomy since they expect those who decide to actually go into an Astro career will proceed onto grad school. The course requirements for the major were very broad https://astro.berkeley.edu/programs/undergraduate-program/requirements-of-the-astrophysics-major/ There were only 3 required Astronomy classes! I personally liked this about the major because I had more options in what I could study, it was easier to double major since there were higher chances of course overlap, and I learned skills that opened up more career paths.
There are probably other universities with more astronomy focused programs, but I think in general astrophysics requires a set of skills that are very transferable, especially at the undergrad level. Upon graduating, some of my peers did continue onto grad school, while others decided to go into data science or (like myself) computer science. I'm currently a software engineer at a tech company.
Another thing to note: Astronomy is not a common major, so the class sizes are pretty small and it's easier to get in touch with/establish a relationship with your advisor.
Hope this information is useful(: