This is a tough one to answer but ideally 4-5 days would be enough.
Meals are expensive and the biggest cost that you have to factor in to your trip is the transfer to your hotel. Either its by a speed boat or a plane(this one is thrilling though especially if you haven't been on a biplane) and both are really expensive. Plan other activities like snorkelling or scuba but again take into account the transit to these places and back. The main issue is simply how to get around in Maldives as in all likelihood your hotel will be on an island and everything you want scattered around different islands.
In my opinion 4-5 days are good enough. 4 days you can be in on some island on a beach resort and one day you can explore Male city. Maldives is an quite an expensive destination . Good beach resorts are very expensive so you can optimise your stay.
Its not more than a week but it gives you a solace which no other place gives! Therefore, depending on your budget if you please to stay more than a week, its all upto you!
Hi Rahul, before answering your question as to how many days trip maldives worth, I would like to give you a personal insight on the place. Maldives is a consortium of small islands which do not have regular connectivity amongst them. So basically when you plan a trip, you will be basically looking at staying at a single resort that will be on a personal island and it will have nothing else to do. Apart from the island life, Male is the capital city of maldives is a small town which has relatively small local markets which can be covered in not more than a day. Thus, now it depends on you as a traveller how many days you are willing to spend at the same place. Rest in my opinion, 3 days on the island and one day in Male is the most preferred itinerary for Maldives. Hope this helps.