While wearing bathing suits and shorts is okay on the popular tourist beaches, like Paje Beach, and at your resort, if you're going into local villages or visiting Stone Town it is best to keep your knees and shoulders covered as the culture is more conservative.