First make sure that the brake is returning to its fully retracted position thereby pulling the lever back into its proper position (keeping it from bouncing around while riding). Excess friction in the cable or housing due to age or poor routing can keep the lever from fully retracting and sometimes causes a rattling. The other possibility is that the nameplate on the shifter has come loose. Depending on the age of the lever you may have a section of the name plate broken off in which case I would replace it, or you may have a loose screw underneath the nameplate that needs tightening.
Pop off the nameplate and tighten the screw.