Yes, a permanent resident or green card holder can sue in US federal court. However, there are some restrictions. For example, a green card holder cannot sue for certain types of immigration relief, such as asylum or cancellation of removal. Additionally, a green card holder who has been convicted of certain crimes may be barred from suing in federal court.
There are also some special rules that apply to green card holders who are suing the government. For instance, a green card holder must file a notice of intent to sue the government within six months of the date on which the cause of action arose. Failure to do so may result in the case being dismissed.