It depends on your age. This information is copied from the SSA Handbook:
Your remarriage after age 60 does not prevent you from becoming entitled to benefits on your prior deceased spouse's Social...