Contributions can be accepted for anyone up to age 65. Once you turn 65, contributions from you and/or your employer can generally only be accepted if:
The rules change once you reach 70, for example, personal contributions can only be made on your own behalf (you cannot receive contributions made on your behalf from your spouse).
The rules change again once you reach 75. As a general rule, only 'mandated' contributions can be made on your behalf after age 75.