Has meditation something to do with religion?

Sometimes, but not always. Originally meditation stems from the field of religion and is used as a means to attain mystical experiences, a personal experience of the Absolute (God), spiritual illumination. Nowadays, meditation is also practiced as a method for relaxation and stress reduction, however, the duration and intensity of practice is usually much lesser in this case.