Who is eligible to vote at a UK general election?
To vote at the UK general election you must be registered to vote and:
18 years of age or over on polling day
be a British, Irish or qualifying Commonwealth citizen
be resident at an address in the UK (or a UK citizen living abroad who has been registered to vote in the UK in the last 15 years)
not be legally excluded from voting
The following cannot vote in a UK Parliament election:
members of the House of Lords
EU citizens (other than UK, Republic of Ireland, Cyprus and Malta) resident in the UK
anyone other than British, Irish and qualifying Commonwealth citizens
convicted persons detained in pursuance of their sentences, excluding contempt of court (though remand prisoners, unconvicted prisoners and civil prisoners can vote if they are on the electoral register)
anyone found guilty within the previous five years of corrupt or illegal practices in connection with an election
https://www.electoralcommission.org.uk/faq/voting-and-registration/who-is-eligible-to-vote-at-a-uk-general-election