What time of year are you going and do you want to hike while visiting le Cinque Terre?
If you are visiting the Italian Riviera between now and the end of April, staying in Rapallo is a good choice because there is more to do there in case it rains. If it is sunny you can easily take the train to see le Cinque Terre, but between now and the end of April, you need to be careful about hiking, because if it has rained a lot before you get there, the high trails can be dangerously slippery.
If you are visiting between May and the middle of October, it is a good idea to stay in one of the 5 villages of le Cinque Terre, especially if you want to hike. It will be hot on the hiking trails, so you will want to get an early start, and the villages will be so crowded during the day that you will appreciate how quiet they are at night time.
If you don't want to hike and you don't like crowds, and are worried that maybe the villages will be too tiny for you, both Levanto and Sestri Levante are nice alternatives to Rapallo (Sestri Levante is especially nice if you like to swim).
But if you like a lively town with a food market, Rapallo is a very characteristic Italian Riviera town which has very nice views, cable car rides, lots of fun shopping, easy ways to visit nearby towns that are charming and also have lots of shopping and hikes and views. (Zoagli is especially nice for walks, or Camogli for lunch and boat rides.)
As long as you don't carry very heavy suitcases, it is easy to take the train from anywhere on the Italian Riviera to Milan (but the shortest train ride without changing trains is from Rapallo). Be careful on the trains in this region. Because the area is now so popular with tourists it has attracted pickpockets & thieves. They are not dangerous, but you need to mind your belongings getting on and off the trains. Don't let people crowd you. Let others go first. Go slowly.