Gandalf, as the representative of the Valar, allowed Frodo and Bilbo to go - Frodo after Arwen intervened on his behalf, and argued that since she had given up her right to go West, it should be given to Frodo.
Here is what the Letters say (letter 246):
It is not made explicit how she could arrange this. She could not of course just transfer her ticket on the boat like that! For any except those of Elvish race 'sailing West' was not permitted, and any exception required 'authority', and she was not in direct communication with the Valar, especially not since her choice to become 'mortal'. What is meant is that it was Arwen who first thought of sending Frodo into the West, and put in a plea for him to Gandalf (direct or through Galadriel, or both), and she used her own renunciation of the right to go West as an argument. Her renunciation and suffering were related to and enmeshed with Frodo's : both were parts of a plan for the regeneration of the state of Men. Her prayer might therefore be specially effective, and her plan have a certain equity of exchange. No doubt it was Gandalf who was the authority that accepted her plea.
Gandalf's personal feelings came into it, too:
Bilbo went too. No doubt as a completion of the plan due to Gandalf himself. Gandalf had a very great affection for Bilbo, from the hobbit's childhood onwards. His companionship was really necessary for Frodo's sake – it is difficult to imagine a hobbit, even one who had been through Frodo's experiences, being really happy even in an earthly paradise without a companion of his own kind, and Bilbo was the person that Frodo most loved. (Cf III 252 lines 12 to 21 and 263 lines 1-2.)2 But he also needed and deserved the favour on his own account.
Of course, they did not become immortal:
Frodo was sent or allowed to pass over Sea to heal him – if that could be done, before he died. He would have eventually to 'pass away': no mortal could, or can, abide for ever on earth, or within Time. So he went both to a purgatory and to a reward, for a while: a period of reflection and peace and a gaining of a truer understanding of his position in littleness and in greatness, spent still in Time amid the natural beauty of 'Arda Unmarred', the Earth unspoiled by evil.
So basically, Bilbo and Frodo (and perhaps Sam) were allowed to sail West because they directly suffered in fulfilling the special plans of Eru and the Valar, because Gandalf liked them, and because Arwen wanted healing for them.