No, there is no requirement to be in the US or visit the US. If you are a US green card holder, then the green card maintenance conditions may require you to keep coming back to the US but they do not affect your Social Security eligibility.