Getting a recommendation letter from a professor at the same university
A letter from a professor at the same institution can be extremely valuable.  I would not necessarily say that they are more valuable than equally on point letters from outside.  However, if a professor is writing a letter to a graduate admissions committee at the same institution, the letter-writer is almost certainly going to have a very good idea what the program may be looking for and how to emphasize the student's suitability for the program.  The reference writer can tailor the letter to make the best possible case, in a way that might be more difficulty for an outside writer.

Moreover, the letter-writer's influence may not end with the written letter.  I have written letters for undergraduate students at my university (some applying to graduate programs in my department, some others applying to programs in other departments).  In some cases (mostly when the students were applying to programs in my own department), I have been contacted by the other faculty members reading the applications, to get a better idea of the students' strengths and potential weaknesses.  (In my reference letters, I always invite the addressees to contact my if they have further questions about a candidate, but it is very rare to get such follow-up inquiries from departments at other institutions.)