Is listening to music on the ear phone bad for the ear?

Depends. If you keep the volume reasonably low, there should be little to no long term risk of hearing damage. Most people however listen to music with the volume up to high. Ear phone/ ear buds will concentrate all of the sound into your ear and can cause damage after prolonged use.