Research grants for international PhD candidates I recently came across a friend who is applying for a PhD in my lab. He happens to be from Brazil, on an F-1 visa. He was told by my advisor that his citizenship status affects the sources of funding available to support his work. I was always under an impression that the principal investigator applies for research grants and funding does not depend on visa status (if any) of the students under his guidance. Was I wrong in making this assumption?
It absolutely depends on the source of funding. Each organization has their own rules. By and large, the NSF (since you mentioned F-1 visas I assume this is US-centric) allows foreign students to receive funding from grants, but this intent has to be disclosed at the time of submitting the grant request. 

DARPA has slightly tighter rules although I'm reasonably sure foreign nationals can be funded. But if you're from a "country of interest" like Iran, there can be other complications. 

Finally, while these are not PI-requested grants, the NSF-Hertz graduate fellowships are exclusively for US citizens. 

p.s This even applies to PIs. There's a large DARPA program that you're not eligible to apply for unless you have a SECRET clearance, for which a necessary but not sufficient condition is that you're a US citizen.