My question is, I used to hear that you needed to visit US at least once a year for a week to keep your green card. Is that still valid or no?
Spending 12 consecutive months outside the US without a reentry permit or some other official reason like military service normally will invalidate the green card.
I am asking because I am planning to get a gc for my mother who will be living in US for 1-2 years in the near future to take care of my baby but then she will have to leave. But she will be visiting us hopefully at least once a year but not for 6 months. She has B1/B2 at the moment. I worry that they would question her a lot at the gate if she just leaves and comes back again before her legal amount of stay expires under visitor's visa.
It is also not true that you need to stay in the US for 6 months a year to keep your green card. However, if you are a green card holder the US is supposed to be your primary residence, and if you are spending more than 6 months a year outside the US for multiple consecutive years, that is an indicator that your primary residence is actually outside the US.
However, it depends on the specific circumstances. For example, if you are a musician who tours the world for 7 months a year to perform for audiences outside the US, never staying in any single foreign country for more than a few weeks, and you spend the other 5 months at the same house or apartment in the US, they can't really say that your primary residence is outside the US. But somebody who always spends 7+ months per year in the same foreign country, year after year, is much more likely to be seen as a primary resident of that other country.
For the B1/B2 visa they do tend to enforce a max of 6 months a year* in the US for people on tourist visas. So if your mother stays for 5 months and then returns a few weeks later with her B1/B2 visa, they probably will refuse entry or only grant 1 month, and then she'll have to wait approximately another 6 months to be allowed back in. Visa cancellation is also a possibility if refused entry when attempting to return so soon after a long stay.
The other problem with B1/B2 is that some immigration officers consider what your mother will be doing as illegal babysitting employment, so she should not give them the impression that she is going to be in the US primarily to take care of your child. Her purpose should be to visit YOU, not to take care of your children or anybody else's children. But visiting you could also be a problem for immigration because you are a US citizen, and parents of US citizens have a high rate of staying in the US to immigrate after entering with a B1/B2 visa. So she may be refused entry on her initial attempt, unless she has a history of traveling to the US since you became a US citizen.
*not per calendar year, but the 12 month period starting with the first visit to the US within the past 12 months.