I have smoked for three years.
This talks about the past event of smoking. But it does not exactly says when. Today, if you say this to me, I'd understand that in past for any three years you smoked. Could be 2000-2003, 1990-93 or whichever 3 years you can guess.
I have been smoking for three years
... means the smoking is continued and it has been three years i.e. you started smoking in October 2012 (three years from now in past).
And yes, you can say that for rain.
You may want to learn further on 'progressive tenses'. For this question, read here for past perfect progressive, here for past perfect and here for present perfect progressive.