I'll cite the rule below. Note that it requires the runner to be in live ball territory and the ball to be love; and that a warning be issued first. So, on the homerun, it's not a problem. On the double, it might be. Note that if play is relaxed (even if the ball is live), the umpires (properly) usually don't enforce this strictly, especially if it's just to wipe the brow or something.
1-5-1 ART. 1 . . . It is mandatory for on-deck batters, batters, runners, retired runners, players/students in the coaches boxes as well as non-adult bat/ball shaggers to wear a batting helmet that meets the NOCSAE standard. The batting helmet shall have extended ear flaps that cover both ears and temples and also display the NOCSAE stamp and the exterior warning statement. The warning statement may be affixed to the helmet in sticker form, or it may be embossed at the time of manufacture. A violation by a non-adult bat/ball shagger shall result in a warning to the coach of the team and the individual. A subsequent violation may result in the individual not being allowed on the field. PENALTY: When an umpire observes anyone who is required to wear a batting helmet deliberately remove his batting helmet while in live-ball territory and the ball is live (non-adult ball/bat shaggers required to wear batting helmet in live-ball area even if ball is dead), the umpire shall issue a warning to the coach of the involved team, unless the ball becomes dead without being touched by a fielder or, after being touched, goes directly to dead-ball area. A subsequent violation of the rule shall result in ejection.