There is a cruise to suit every taste and therefore the dress code varies depending on the cruise you have booked, some being casual for the entire cruise and others more formal.
During the day, clothing tends to be laid-back and casual, with beachwear recommended for warmer climates and layered clothing recommended for cooler climates. Comfy shoes are sensible to wear when going on shore excursions and remember to bring your gymwear and trainers if you want to exercise on-board. You should also bring swimwear but remember that it is not permitted in the main restaurants and lounges and shoes are required at all times.
In the evenings, the general rule is smart-casual with no shorts or sportswear, although many cruises may have a more relaxed dress code which may include jeans. There may also be some formal nights where a dress-code may apply for entry to some restaurants, although there is usually an informal or casual alternative.
Here's a brief guide to recommended evening clothing:
Smart-casual - trousers with open-neck shirt (men), separates or dress (ladies)
Informal - trousers with smart shirt (men), skirt or dress (ladies)
Formal - dinner jacket or dark suit (men), cocktail dress (ladies)
There will usually be a range of clothing available from the on-board clothes shops if you need to make some last-minute purchases.