Overnight /weekend stay would be ideal to enjoy Versailles at leisure - spend the whole day and the Chateau and the gardens.
Check out the small, hassle-free town and small attractions the day after. Otherwise a full day at the Chateau and gardens would suffice, if time is limited. Enjoy the history and culture!
Visiting the chateau is what most people come to Versailles for, however the city is charming and deserving of a visit in it's own right.
There are many nice little shopping areas and a street market selling crafts and local produce, restaurants have variety - try the Palace du Marrakech for a lovely Morrocan meal at around 20 euros per person.
Don't go to "Votre Marche" on the main street since the owner is not friendly. Must go rent a bike in the park of versailles and ride around since the view is just amazing!