90% of Turkish people are Muslim, however, for many people this is more of an identity rather than a strict religion. You would never guess this statistic walking around much of Western Turkey, especially Istanbul, which in part is a trendy, cosmopolitan city. Turkish Law is secular and guarantees complete freedom of worship to people of all religions. It is recommended that at least one set of modest clothing is taken with you. It is a sign of respect to cover your shoulders and legs when visiting mosques and also attracts less unwanted attention. You cannot visit a mosque during prayer time unless you are praying. If you have any questions concerning appropriate (and legal) behaviour please ask your tour guide or leader. If accused of and detained for illegal behaviour, the Turkish authorities are obliged to inform your embassy or consular representative immediately, you can also insist on communicating with them directly. Turkish authorities command a high level of respect so be polite at all times.
Turkish law requires everyone (Turks and non-Turks) to carry ID at all times. Always remember that in Turkey you are bound by Turkish law.