The tunes are mainly a Tokyo and surrounding area thing. JR lines used to just play a monotone sound when trains were approaching, but they changed to tunes to make things a little more cheerful on the platform. You can find some of them on websites. My favourite when I lived down in Saitama was the Musashino line (an otherwise throroughly forgettable line running from Chiba up into Northern Saitama). They played "Moon River" to announce trains arriving, which often brightened up my daily commute to work.
Tiger