If you're looking to really understand the story, it's probably best to play the first three Pikmin games if you want more lore. However, you'll still be able to follow along easily in Pikmin 4 without playing any others.