As an undergraduate (not studying computer science) I was fortunate enough to work in the lab of the CS department chair at my university for an extended period of time. This work resulted in me being added as a coauthor to one of her most recent papers. She also knows me well - I took an intro CS course with her, and during my time in the lab we would be in contact practically every day. I definitely plan on asking her for a recommendation letter when I apply for graduate school in computer science next year.
Although I know that going to the same university for undergraduate and graduate school is sometimes discouraged, I would quite honestly be very happy to return there, as I very much enjoyed working under her, she is well-known in her field, and some of her research interests are very close to mine. In any event, it would be nice to have a "safety net" of sorts while exploring other options.
I know that every university has different policies about admissions decisions, so no one can speak to my particular case. But in general, how much would you say that having the backing of the department chair helps in graduate school admissions?