The GLOBALCIT Dataset of Migrant Electoral Rights (MER) covers voting and candidacy rights for both non-citizen residents and non-resident citizens. The dataset contains up to 488 indicators of voting rights across 165 countries from 1960 to 2020!
More details (including the codebook and the actual data) here.