Note: This advice was written with Ph.D. applicants in Computer Science in mind, particularly in the United States. It may also be useful for people in other science and engineering fields where advisors play a major role in your doctoral work. It may be useful for people applying into other kinds of programs. I'm not sure it holds as well for professional or course-oriented masters degrees, or for any degree in a non-technical field. For example: note that none of my discussion below takes into account the cost of getting an advanced degree. That is because CS Ph.D. students in the US are typically supported by sponsored research projects; being a Ph.D. student is a job, one of the benefits of which is tuition.
Q: Where should I go to graduate school?
As an undergraduate, taking classes, you function mostly individually, especially in Computer Science. In grad school, this is rarely the case. Grad school is primarily about research, and while research is sometimes done individually, it usually involves lots of interaction and very direct mentoring. (Not always, of course, but for most people.)
The most important part of the decision, in my opinion, is: who will be your advisor? Your advisor is the person who will guide your research and give you career advice. Your advisor will help you get your first job after grad school. If you don't know how to do research or read technical literature or write papers, your advisor will probably be the one teaching you. For you to be happy in grad school (and many people aren't!), you have to have an advisor you trust, and whose research vision you find exciting, and who cares about your success.
Note that you may not be able to choose your advisor when you choose the school. Some departments don't "match" students to advisors until after they've started in the program. So there's a bit of gambling; if you have to gamble, talk with the prospective advisor and find out whether they plan to take students at the time you'll want to be taken. Are there alternatives at that school if it doesn't work out with that person?
Second to the advisor question is, what kind of research community is there? Ideally, you will go to a place where a lot is happening in your area and outside of it. How many professors are there whose work you find interesting (even if you don't plan to be advised by them), and what do you think about the other students? This is often overlooked. You will interact more frequently and (in many cases) more technically with your student colleagues than with the faculty. The senior grad students you meet in a given department are your best approximation to what you're going to be like in 4-5 years - do you like what you see? Will these people help you succeed? Will you learn from them?
Also, be sure to talk with your prospective advisor's current (and even former) students. Grill them about his/her research advice, his expectations, his strengths, his flaws. Does he have his students' best interests at heart? Does everyone get the attention and face time they need from her? How much freedom is granted to students to follow their own paths? What's his/her funding situation - are things going well? How much these answers matter will depend on what (you think) you want.
My opinion is not held universally. You may hear an argument along the following lines: "If you're brilliant [and you are], you will do well no matter where you go. So go to the best place you can get into." This has three flaws. First, none of us is so brilliant he/she can't still learn a thing or two from a good teacher. Second, no matter how brilliant you are, you'll be better off and more productive (and more brilliant) if you are happy. Third, graduate institutions (schools, departments, labs) sit in such a high-dimensional space that there isn't usually a clear way to choose which is "best." There's a small industry in defining rankings for academic groups, and if you read the fine print you'll realize that it's based largely on arbitrary factors and aggregations of opinions. I'm not saying there aren't different tiers or that all CS departments are the same. I'm saying not to trust the rankings too much or for fine-grained distinctions.
This isn't to say that there aren't other considerations. Obviously, family and social considerations, geographical preferences, and institutional preferences (e.g., not wanting to stay in the same place you did your undergraduate degree, or even choosing a prestigious department) can play in. But my advice is to use these as tie-breakers (except, obviously when you have hard constraints!) and focus on the people who will become your mentors and collaborators. It's the people that make or break a place, and it's the people you'll be around day to day that will make graduate school fun, challenging, and productive (or not).
Q: I know better than to draw conclusions from a sample size of one! Where else can I go for advice?
Here's a great document from Mor Harchol-Balter at CMU.
Chrisof Monz has a brief and readable guide to doing Ph.D.