I couldn't find much credible sources regarding this, but here's an official response from the UK government to a petition requesting that only British voters be allowed to vote in UK elections.
As an issue of national significance, the Parliamentary franchise is the appropriate starting point. This follows precedent, including the 1975 vote on membership of the European Economic Community.
The franchise for the EU referendum is based on the franchise for Parliamentary elections. Reflecting our historical ties, this includes Irish and Commonwealth citizens resident in the UK. Two small additions have been made to the Parliamentary franchise: Members of the House of Lords; and Commonwealth and Irish citizens who can vote at European Parliamentary elections in Gibraltar.
The referendum is an issue of national significance, so it is appropriate that the Parliamentary franchise is used as a starting point. This is the approach we have taken to similar referendums in the past. For example this franchise was used, except for the addition of Gibraltar, for the 1975 referendum on membership of the European Economic Community and for the 2011 Alternative Vote referendum. It is also similar to the franchise set for the referendum lock on transfers of power from the UK to the EU required under the European Union Act 2011.
This franchise also follows the usual practice for referendums in other EU Member States. Under the EU treaties, EU nationals have the right to vote in municipal elections and elections to the European Parliament in other Member States. But this right does not extend to national elections or referendums. For example, British citizens living in the Netherlands and France were not entitled to vote in the Dutch or French referendums in 2005.
The UK Parliamentary franchise includes, in addition to British citizens resident in the UK or abroad if they were registered to vote in the UK in the last 15 years, resident Irish citizens and resident Commonwealth citizens who have leave to enter or remain.
The European Union Referendum Bill received Royal Assent on 17 December 2015 and is now an Act of Parliament. The question of the franchise was properly debated in Parliament during the passage of the Bill and this approach received overwhelming support of both the House of Commons and the House of Lords. It is not possible for Parliament to change the franchise without fresh primary legislation which would significantly delay the referendum, the date for which has also now been set by legislation.
Foreign and Commonwealth Office
UK citizens can also vote in Irish Dáil Éireann elections
It's worth noting that there's a reciprocal agreement between the Ireland and the UK. The Electoral (Amendment) Act, 1985 gave the right to British citizens to vote in elections to Dáil Éireann (the lower house of parliament).
(1A) (a) In addition to those entitled to be registered under subsection (1) of this section, a person shall be entitled to be registered as a Dáil elector in a constituency if he is a person who has reached the age of eighteen years and who on the qualifying date—
(i) complied with the requirement of subsection (1) (b) of this section, and
(ii) was either—
(I) a British citizen, or
(II) a national of a Member State to which this subsection applied on that date.
(b) This subsection applies to a Member State which is for the time being the subject of a declaration under subsection (1B) of this section.