Going topless is not a criminal offence as far as I am aware but Turkey is predominantly a Moslem country and visitors should respect their customs. It is probably OK if lying on your stomach but not acceptable to be playing ball or games topless.
Some Turkish ladies, while at the beach, go into the sea virtually fully dressed or with swimwear that covers them.