Loud noises coming from my sump pump
Most often, a rattling sound could be a piece of debris that is not getting fully lifted and ejected out with the water, like a small rock. Also, some pumps come with internal backwater valves that can become loose or broken and cause rattling.  And a third possible cause would be the bearings or stator giving out on the motor. 
I recently replaced my third sump pump over seven years of using them (year 1, 4 and 7). I would estimate the life expectancy for a pump that I use to be about 3 years.