I remember when there was about three types of caulk, one for shingles, one for the tub and one for painting which was paintable, now there is rows and rows of that stuff and picking out caulk can be as difficult as cutting out crown molding.
In direct response to your question, If its to be on the outside, then I would get a good 35 year latex silicon caulk that is paintable. If its in the inside of the windows that will be a shield of sorts I would get a goodquality 100 silicon caulk or butyl rubber that will stretch and hold. This will not be paintable, so always take that precaution when using caulk, will I paint it or not.
There is a 100 silicon out now that is paintable, I have not tried it because its $7 a tube. Wow.