You get your accent from the people around you during your 'formative years'. Now, Mario and Luigi are Italian, they immigrated to NYC when the were young (why when they were young? Mario and Wario were childhood friends, and Wario is German), Mario and Luigi's family all spoke with an Italian accent, so that is why they have an Italian accent and not a Brooklyn accent.