Any lens can be used, although there are certain lenses that are favored over others for the different purposes. If you don't know, you'll just have to try shooting your 2 preferred genres and ask yourself what is hindering you from achieving a better photo.
although any focal length will do, "usually" there are preferred focal lengths due to the effects/perspective they can give:
for landscape use wide angle - wide angle gives you greater perception of depth, you would be able to capture more and nearer foreground subjects which will accentuate the perception of depth relative to your background which are usually far.
for portrait use tele - on the other hand, you would want flat/more compressed perspectives for portraits