Historically, what types of sets have proven to be a great investment?
The less sets there are available, the better the chances of a rising price. This implies the sets that will get more expensive with time are:


Sets that are or very close to being out of production
Sets that are expensive when they come out (> less sales)
Very large sets (expensive > less sales)
Licensed sets like Harry Potter or Star Wars (short production-time > less sales / collector's value)
Sets with unique/limited parts or colors like the maersk-ships
Collector's editions


But note that it's never so easy - licensed but small sets for example won't become very expensive as they usually sell very well, so you should look for a set with a combination of this criteria. For example: a very big licensed set like the Millennium Falcon.