Sometimes I see people selling food stamps. Is that legal? What about other government benefits? Can they be bought and sold legally?
Under 100$ is a federal misdemeanor over is a felony. Purchase or sale.
Others have answered the Food Stamp question.
What about other government benefits? Can they be bought and sold legally?
This question is really too broad to answer and has different answers on a case by case basis.
Generally speaking, you cannot legally pledge most forms of cash welfare (e.g. TANF payments) as collateral for a loan, but you can obviously spend cash welfare or give it as gifts, as you see fit.
Medicaid and Medicare benefits are not transferrable to another prospective patient, but a health care provider who has provided services can assign or pledge the right to receive payment under these programs for providing benefits to patients like any other account receivable.
Section 8 rent assistance payments cannot be assigned or transferred by the tenant, but they are assignable by the landlord to whom they are payable as an account receivable, and often a beneficiary of a Section 8 rent assistance payment is allowed to have a guest or family member who is not on the lease in the premises who is indirectly benefiting from the program.
Most subsidy payments paid to developers for building low income housing are assignable.
Disability payments generally cannot be pledged or seized by creditors or spouses, until they are comingled with other funds, but cash received and comingled can be transferred like any other cash.
There are some government benefits (e.g. certain pensions) that can be seized for child support or transferred in a divorce, but not for other debts and can't be voluntarily assigned.
Generally speaking, in kind welfare benefits cannot be assigned by a welfare beneficiary prior to receipt and sometimes also not after receipt, but it is analyzed program by program.
It can be a felony or a misdemanor but usually it is a felony.