Depends on the circumstances, but most of the time you will want to improve the tile as it will obviously give more prod/food/comm once improved.
However, in some cases, you may want to settle on top. If I ever need to settle on top of a resource, it's not because of the resource itself, but becasue of a pre-planned city placement idea that I have to get the most out of all the tile in the area.
GOTM - 01 was another one. In this game, we were playing as Julius, and so Praetorians were the UU. Once Iron Working was researched, Iron was found not far east of Rome on a desert/costal tile IIRC. This has a lot of hill space and looked pretty good as a production city. I settled on top of the Iron to protect from Alex who was a close neighbour (a resource you settle on can't be pillaged), and for efficient tile usage reasons. This particular city was going to crank out Praet's, so it made sense to settle on the Iron to start cranking our Praet's immediately in that city.
So, it does depend on the circumstance, but in general, I will usually only ever think about settling on copper/iron, and then only if that copper/iron is in a potentially easy place to get pillaged (such as you cultural borders). Food and happiness resources and never think about settling on. You always get more from the tile by improving it.