At the undergrad level, strength of department doesn’t matter a tremendous amount . Departmental rankings measure strength of research and faculty, and this doesn’t necessarily translate to the educational experience for undergrads.
This being said, from what I understand, Penn is below the very first rank of economics programs (e.g. Harvard, Chicago, Stanford, Princeton, and MIT), and in the pool with Northwestern, Columbia, Michigan, etc. So, for the purposes of 95% of undergraduates, it’s a great environment. For the tiny subset considering doctoral programs in economics, an opportunity at Harvard et. al. could prove to be a marginally better decision.
For a discussion of the first rank of schools, and how Stanford is now seen as the biggest star, see here:
http://www.nytimes.com/2015/09/13/upshot/how-stanford-took-on-the-giants-of-economics.html?_r=0