The Cocos Keeling Islands are warm, casual and relaxed. Shorts, t-shirts, sarongs, swimwear and a beach towel are probably all you will need. For footwear, bring comfortable sandals or joggers, as well as footwear for reef walking.
Days can sometimes be cloudy but the sun is still very strong on Cocos. Cloudy or clear, you will need a high SPF sun cream and, if you like, a rash shirt to avoid sunburn.
Unless you are visiting when there is a special function, evening wear is definitely not required. Ask your travel agent or contact the Visitor Centre regarding 'formal' events during your stay on the islands.
Please cover your shoulders and knees when visiting Home Island. Apart from this sign of respect, the dress code is still 'casual and comfortable'.