This article is from the FAQ, by with numerous contributions by others.
If you or your family members get public benefit, it will not affect your
ability to become a citizen. But before you travel, remember - if you
depend on public benefits, INS can keep you from reentering the United
States. Also, your family members who get permission to stay under the
"family unity" program will have to show that they do not depend on
public benefits when they go to get their green card.