If you want to get into a top public university such as Berkeley or UNC Chapel Hill, you're going to need good grades and strong standardized test scores. Realize that these prestigious universities do not have a cut-off for grades, ACT scores, or SAT scores. Highly selective universities have holistic admissions, so the admissions officers will be looking at more than empirical data. Challenging courses, a winning essay, and interesting extracurricular activities also play an important role. In many cases, letters of recommendation, a strong interview, and your demonstrated interest can also improve your chances.
That said, the numbers do matter, and higher is better. These graphs show GPA, SAT score and ACT score data for accepted and rejected students at ten of the country's top-ranked public universities: Berkeley | Chapel Hill | Georgia Tech | Illinois | Michigan | UCLA | UCSD | Virginia | William & Mary | Wisconsin