If digital versions are included, there's a handful of games I recall buying three times. The NES Zelda games (NES, Wii, 3DS), Ocarina of Time (GCN, Wii, 3DS), A Link to the Past (GBA, Wii, Wii U), Metroid Prime 3 (Original Release on Wii, Prime Trilogy disc on Wii & Prime Trilogy download on Wii U). Now that I think about it, I could easily pay for the NES Zelda games and Ocarina of Time for the fourth time if I finally pay the upgrade fee for the Wii U Virtual Console for less than a dollar each.
If digital versions are not included, I don't think there's any game I've bought three times, but countless games I've bought twice. Notable games off the top of my head would be Twilight Princess (Wii, Wii U), The Wind Waker (GCN, Wii U) and Mario Kart 8 (Wii U, Switch).