If a spouse's parents, who are from another country, have a green card and they plan on staying in the US with their spouse's family for 6 months of the year and their home country for 6 months, can they collect social security while they are in the US? They are of age. They have never worked in the US though and don't plan on working while they are in the US.
No. The Social Security retirement program is designed for workers, people who worked and paid payroll/FICA/OASDI taxes on their jobs or their business for a minimum of ten years in their lifetime. It is not designed for people who visit the US six months a year, even if they have a "green card" which is another word for lawfully admitted permanent resident. Sounds like someone was not totally honest with Homeland Security when they stated they wanted to make a home in the US, but really want to take turns visiting their adult children. But that doesn't matter since they did not pay any payroll taxes so there are no retirement benefits.
How would they support themselves in their home country? I assume that one or both of them performed work in their younger years. Do they come from a country with a pension system?
There is also the SSI program for US citizens and some immigrants. But SSI is strictly a welfare program, a needs-based, low income/resource, government handout program. Whoever sponsored them to get their green card signed a form stating that these immigrants would not become a public charge, not the responsibility of the taxpayers. SSI would consider both their own money and their sponsor's money in determining their eligibility even if they managed to meet one of the complex immigrant qualifications. And then again, it sounds like they are just visiting the US, a long vacation, but not really making the US their home, so the SSI would be denied for that too.
How nice for them that they have family that can take care of them.