Early instances of the phrase 'play into [someone's] hand[s]'
Searches of the Early English Books Online and Hathi Trust databases yield several instances of the expression "play into [someone's] hand[s]" in writings published before 1681, when (as noted in Justin's answer) an edition of John Birkenhead's pamphlet, "The Assembly-man," appeared with the notation that it had originally been written in 1647. Here are those instances, in chronological order.
From Henry Neville, "Shufling, Cutting, and Dealing, in a Game at Pickquet: Being Acted from the Year, 1653 to 1658" (1659):
Nevel. — I will not play for a farthing; besides that, I love not the Game, I am so dun'd with the Spleen, I should think on something else all the while I were a playing; and take in all the small Cards: for I am all day dreaming of another Game.
Waller. My Lord, you have hang'd my King, and I have no other way then to play into your hands.
From a letter to Edward Nicholas from Tristram Thomas (April 4, 1659), in The Nicholas Papers: Correspondence of Sir Edward Nicholas, Secretary of State, volume 4: 1657–1660 (1920):
.I must not forget to tell you that in oure former discourse with him [Alexander Popham] he tould me that he had lately spoke with Sir William Waller and some other of our friends, who are of opinion that, if the Parliament be not interrupted or the army, they would fall into great disorder quickly and then the game, said he, will play into our hand, which I will like-wise hope as a thing not vnlikely. Yet I desire to receiue advice and order from his Maty in case Cromwells party and the rest of the army should agree and so settle Crumwell, for the Republique party are to weake for them in the House ; so, if he should come to be confirmed, how he will be opposed I see not, and I pray God that others his Maty relieth vpon may shew that zeale her may expect from them. In fine, I finde the accoumpt bad enough and that the Presbiter party in general are naught and the best of them to play their game with so much precaution that with Sir William Waller their expectation to haue the worke play to their hand that I can hope little of good by them, I meane they great ones, and wish that Major General Browne proue to answer his Matys expectations.
From A Friend to the Good Old Cause, "The Character of the Late Upstart House of Lords: Together with Some Reflexions on the Carriage and Government of His Late Highness" (1659):
He [King Charles] is not long after beheaded as a Tyrant, Traytor, and grand Incendiary: the Nation is declared a Free State, during which time, great and horrid injustice and abuses were committed, to the shame and infamy of that Parliament. Cromwel being now arrived to the dignity of Commander in chief, over all the Forces of the three Nations; in it he planteth Anabaptists, to poyze with the Independants and Presbyterians, who were the friends of the Parliament. The Parliament foreseeing the underhand dealing of the Army to play into Cromwel's hand, Resolved to dissolve themselves, and call a new Representative; but Cromwel preventeth them, and forcibly dissolveth them, under pretence of the heavy burthens that yet continued upon the people, and his Army ruleth.
From John Birkenhead, "The Assembly-man" (1662) [1663] (an earlier edition of the 1647/1681 pamphlet):
There is not on earth a baser Sycophant [than the Assembler]; for he ever is chewing some Vote or Ordinance; and tells the People how savoury it is; like him who lick'd up the Emperour's spittle and swore 'twas sweet. Would the two Houses give him Cathedral Lands, he would prove Lords and Commons to be Jure Divino: but should they offer him the Self-denying Ordinance, he would justifie the Devil and curse them to their faces, (his Brother Kirk-man did it in Scotland.) 'Tis pleasant to observe how finely they play into each others hands; Marshall procures Thanks to be given to Sedgwick (for his great pains) Sedgwick obtains as much for Marshall, and so they all pimp for one another.
From John Dryden, The Wild Gallant, a Comedy (1663/1669) [as noted in Justin's answer]:
Trice. ... Stay; what am I for the Point? but bare Forty, and he Fifty one: Fifteen and Five for the Point, 20, and 3 by Aces, 23. well, I am to play first: 1.23. 2. 23. 3. 23. 4. 23.—Pox on't, now I must play into his hand: 5—now you take it Jack, 5. 24. 25. 26. 27. 28. 29. 30. and the Cards Forty.
Early instances of the phrase 'play to [someone's] hand[s]'
Tristram Thomas's letter 1659 letter to Edward Nichols is unique among the earliest sources of the phrase "play into [someone's] hand[s]" in also containing the very similar-looking phrase "play to [someone's] hand[s]." In Thomas.'s letter, the two phrases seem to be interchangeable, since they refer to the same expectation on the part of Sir William Waller and his friends.
An EEBO search for "play to [someone's] hand[s]" turns up two instances that are even earlier than Thomas.'s—one from 1646 and one from 1654. From Samuel Rutherford, The Divine Right of Church-government and Excommunication: Or a Peacable Dispute for the Perfection of the Holy Scripture in Point of Ceremonies and Church Government (1646):
Erastus. The Ministers have none, by whom in their office they can be corrected: But saith Erastus, If every soul be subject to the higher powers, how are Ministers excepted? if Ministers correct Ministers, they play to others hands, spare thou the nails, and I shall spare the teeth.
Ans[wer]. The Author doth not except Ministers from civill subjection to Magistrates: But only he saith, In Ecclesiasticall censures, the Magistrate is not to judge the Ministers; because a Ministery being an Ecclesiasticall office, as such, it is not liable to the civill power, only the Ministers as they erre and sin in their persons, are liable to civill punishment, but not to Ecclesiasticall, to be inflicted by the Magistrate.
From George Hutcheson, A Brief Exposition of the Prophecies of Obadiah, Jonah, Micah, Nahum, Habakkuk and Zephaniah (1654):
Verse 3 [of chapter 7 of Micah ]
That they may do evil with both hands earnestly: the Prince asketh, and the Judge asketh for a reward: and the great man, he uttereth his mischievous desire; so they wrap it up.
...
It is an usual sin also, in declining times for great men so to play to others hands, as to strengthen them∣selves and one another in evil courses; for so was it in this time: so they wrap, or, twist it up: a similitude taken from cords twisted together to make them strong, signifying the conspiracy of the Judge and great man, that the one may get his bribe, and the other may make his prey of the poor.
Discussion
It is tempting to imagine that people in the middle 1600s viewed "play into [someone's] hand[s]" and "play to [someone's] hand[s]" as having the same meaning. Certainly, the 1659 letter from Tristram Thomas treats them as equivalent. If they do mean the same thing, the "to" form of the expression seems to be slightly older in print than the "into" form.
But whether or not people commonly used the "to" and "into" forms of the phrase interchangeably, individual writers seem have used the phrase to mean two distinctly different things. In some instances, as in Birkenhead's 1647/1662 use of "play into each others hands" and Hutcheson's 1654 use of "play to others hands," the sense of the phrase seems to be "provide a benefit to someone else with the expectation of sooner or later receiving something beneficial from that person"—the classic quid pro quo arrangement. In other instances, as in Neville's 1659 satirical (and metaphorical) card-table conversation and in Dryden's 1663/1669 play, the sense of the expression is "to be forced by circumstances (or perhaps as a result of poor strategy) to provide a benefit to someone else to one's own disadvantage." The modern sense of "play into [someone's] hands" is much closer to the latter meaning.
One of the most striking things about the seven instances from the period 1646–1669 cited in my answer is how many of them use "play [in]to [someone's] hand[s]" figuratively rather than literally. In fact, of the seven, only the youngest, from Dryden's The Wild Gallant, uses the the phrase literally in the context of an actual (simulated) card game. The other six use it in the context of politics or religion, although Neville presents it in the context of a series of double-entendre comments by participants in a metaphorical card game.
The other striking thing about these instances is how many of them are caught up in the political moment following the death of Oliver Cromwell in 1658. Neville attributes the phrase as (as it were) the punch line of a pithy political remark by Sir William Waller in the table talk at his imagined card game in 1659; Thomas refers to the same person (Waller), using the same figure of speech in his 1659 letter to Nichols; the anonymous pamphleteer of "The Character of the Late Upstart House of Lords" (also 1659) involves another look at the political state of Britain immediately after Cromwell; and Birkenhead's belated 1663 publication of "The Assembly-man" seems likewise to be a character sketch intended as a critique of politics in the early days of the Restoration, although his publisher in 1681 asserts that he wrote it originally in the brief period between the First and Second English Civil Wars.
It seems to me that a phrase drawn from a commonplace activity (such as from the jargon of picquet players in the comfortable—or at least upwardly mobile/striving—classes of sixteenth-century England) is unlikely to gain widespread figurative use unless it has a fairly firm hold in the milieu where it originated. Applying that general rule to the present case leads me to think that "play [in]to [someone's] hand[s]" was probably a fairly common expression among card players even before 1646, when the expression first emerges in print, in a political/religious commentary (albeit, in that instance, with a figurative meaning that is far from obvious).