Celebrity is a 5* line so formal does mean in the main dining rooms & as a rule people who book Celebrity do so BECAUSE they have a dress standard. Matalan had a perfectly respectable tuxedo on sale at Xmas for forty quid, so it need not cost mega bucks to 'join the party'. Go for it & I guarantee you will enjoy it.
If you stated Ship & cruise Line you would get a exact response. If you choose to eat in the self service restaurant there is no need to adhere to the dress code. The second sitting is for the Main Dining Room only. If you choose a 'paying' restaurant you book a time to suit yourself. Formal only means 'suited & booted' it's not powdered wigs & frock coats so don't be concerned if this is your first time. Just enjoy it.
My husband and I love dressing up for formal nights but have noticed that many Americans don't, so on Princess it seems that anything seems to go as long as gents wear long trousers and not shorts.
Sorry... missing information ... Celebrity Solstice, cant find out exact details from previous cruisers about this as ship has not yet been built, so there are no reviewers, but I guess the same rules will apply as the other Celebrity fleet.
As far as P & O Cruises are concerned you are expected to conform to the dress code of the day. However, dressing up is part of the fun and excitement. If you do not want this then you should seek a cruise that is informal. Failure to take part could cause annoyance to the other guests who have enjoyed so doing.