When is it recommended to use gradient created by the iphone itself and when is an image the better choice?
That is a pretty vague question, are you thinking about any particular situations? Unless you are doing very intensive processing or heavy graphics (game) then the difference in processing time is probably not going to be noticeable. I haven't measured it, but I would bet the difference in overhead is pretty minimal, so do whichever you think is easier/nicer looking until you find a problem.
This question asks something similar. As with most performance-related questions, you are best served by using Instruments and other tools to determine if this is an area worth spending the time to optimize.
As I state in my answer, I had noticed a significant amount of time being spent during launch in the Quartz functions for drawing a radial gradient in the background on an iPhone 3G. By switching to an image, I was able to noticeably reduce startup time of my application. However, a new image would need to be generated for each larger display size, so for the newer devices (iPad, iPhone 4), I use the Quartz radial gradient once again because of the negligible rendering time on those systems.
For linear gradients, it has been my experience that a CAGradientLayer gives you both good performance and scalability to new resolutions, but again you'll need to test this in your particular application.