A 39-year-old man and an 8-year-old boy who were pulled from the water at a San Mateo County beach Sunday afternoon later died at a hospital, officials said.