Social Security number requirements for credits

Which credits require a valid Social Security number, and why a missing number can cost you the credit.