Claudius first decides to send Hamlet to England because he's afraid of what Hamlet knows about his murdered father, and because Claudius thinks that a change of scenery might help cure his melancholy.
CLAUDIUS: . . . There's something in his soul
O'er which his melancholy sits on brood;
And I do doubt the hatch and the disclose
Will be some danger; which for to prevent,
I have in quick determination
Thus set it down: he shall with speed to England
For the demand of our neglected tribute.
Haply the seas, and countries different,
With variable objects shall expel
This something-settled matter in his heart,
Whereon his brains still beating puts him thus
From fashion of himself. (3.1.173–184)
He then confides to Rosencrantz and Guildenstern the real reason he wants Hamlet to go to England. Claudius has become increasingly concerned about Hamlet's behavior. Claudius doesn't really think that Hamlet is mad, but he doesn't want to take any chances.
CLAUDIUS: I like him not, nor stands it safe with us
To let his madness range. Therefore prepare you.
I your commission will forthwith dispatch,
And he to England shall along with you.
The terms of our estate may not endure
Hazard so near us as doth hourly grow
Out of his brows. (3.3.1–7)
Later we learn the contents of the "commission" which Claudius gave to Rosencrantz and Guildenstern for Hamlet when he orders them to accompany Hamlet to England.
HAMLET: . . . That on the supervise, no leisure bated,
No, not to stay the grinding of the axe,
My head should be struck off. (5.2.24–26)
Hamlet already knows he's being sent to England when he accidentally kills Polonius, and he probably suspects what Claudius intends to have him killed, but Claudius uses the death of Polonius as further pretext for getting Hamlet out of Elsinore as soon as possible, supposedly for Hamlet's own safety.
CLAUDIUS: Hamlet, this deed, for thine especial safety—
Which we do tender as we dearly grieve
For that which thou hast done—must send thee hence
With fiery quickness. Therefore prepare thyself.
The bark is ready and the wind at help,
The associates tend, and everything is bent
For England. (4.3.42–48)
As for a reason why Claudius didn't just have Hamlet killed in Denmark (or kill him himself, like Hamlet's father), Claudius fears that Hamlet is too well-liked by the people, and there would be repercussions again him if Hamlet were killed.
CLAUDIUS: I have sent to seek him, and to find the body.
How dangerous is it that this man goes loose!
Yet must not we put the strong law on him.
He's loved of the distracted multitude,
Who like not in their judgment, but their eyes;
And where 'tis so, the offender's scourge is weigh'd,
But never the offence. To bear all smooth and even,
This sudden sending him away must seem
Deliberate pause. Diseases desperate grown
By desperate appliance are relieved,
Or not at all. (4.3.1–11)
As for why Claudius sends Rosencrantz and Guildenstern to England with Hamlet, we know that Rosencrantz and Guildenstern are childhood friends of Hamlet, and that Claudius sent for them earlier in the play to spy on Hamlet and "glean" what's bothering him.
CLAUDIUS: I entreat you both
That, being of so young days brought up with him,
And sith so neighbour'd to his youth and haviour,
That you vouchsafe your rest here in our court
Some little time; so by your companies
To draw him on to pleasures, and to gather
So much as from occasion you may glean,
Whether aught to us unknown afflicts him thus
That open'd lies within our remedy. (2.2.10–19)
Claudius might think that Hamlet will be less suspicious of his motives for sending him to England if Rosencrantz and Guildenstern go along with him, but Hamlet already suspects Rosencrantz and Guildenstern of conspiring with Claudius against him.
HAMLET: There's letters seal'd; and my two schoolfellows,
Whom I will trust as I will adders fang'd,
They bear the mandate; they must sweep my way
And marshal me to knavery. (3.4.219–222)
Claudius wants to make sure that Hamlet doesn't get away from Rosencrantz and Guildenstern on the way to England or otherwise thwart his plan to have Hamlet killed when he gets there.
CLAUDIUS: Arm you, I pray you, to this speedy voyage;
For we will fetters put upon this fear,
Which now goes too free-footed. (3.3.24–26)
It didn't quite work out that way.
Another reason for sending Rosencrantz and Guildenstern to England with Hamlet might be that Shakespeare had no further use for Rosencrantz and Guildenstern in the play. They served their purpose, and since Shakespeare knew the plot twist—since he wrote it—he knew that Rosencrantz and Guildenstern wouldn't be coming back to Elsinore, and the actors playing Rosencrantz and Guildenstern could play other parts.