Topless, or nude, sunbathing is illegal however the practice is widely accepted and on most beaches, especially those of the private hotels, it is allowed.
If you are going to vacation there, whereabouts do you plan to stay? Look for the beach hotels where kiddies are not permitted, such as Sandals, for more relaxed sunbathing rules. Also, remember that beach attire (or less) isn't appropriate for town, the shops or restaurants outside of your hotel.