It's all based on your personal situation, for me, I like to change cars every few years so I lease.
I drive very little so I maintain lower than average miles, so leasing is great for me, why?
My last car before I leased this '11 328i was an '08 Acura TL, When the 36-mo lease was up I had only 23k miles, and drove to CarMax on my last month and was offered $21,000 for my car, and my lease buyout was $18.5k.
Needless to say I sold it to them, it was painless and took 20 minutes, they sent a check directly to Acura Financial Services for $18.5k and cut me bank draft right there on the spot for the remaining $2,500 (minus $149 processing fee). All in all I re-couped my down payment of $1000 for the Acura put it back towards the 328i and put $1,500 in the bank....
I could have of course sold it around $23-$24k maybe via Private Sale, but the hassle of people coming to my home/work driving the car etc isn't worth the extra thousand or 2, Carmax makes it hassle free, I was appraised and sold within 40 minutes.
I also did this with my Mazda RX-8 (car before the Acura). I plan on being able to easily do this with the 328i @ lease end.