You could have used the time that you spent on playing games for test studying.
ご質問ありがとうございます。
"You could have used the time"=「あなたは時間を使うことができたはずだ」
"that you spent on playing games"=「ゲームをするのに使った」
"for test studying."=「テスト勉強のために。」
追加:「費やす」を "use"と訳しましたが、この文脈では"devote"=(時間などを)「ささげる」を使うことも出来ます。
ご参考に。
You should have spent the time you were playing games studying for your test.
「ゲームをしていた時間をテスト勉強に費やせたはずだ」という状況は、英語で "You should have spent the time you were playing games studying for your test." と表現できます。
"should have" は「~すべきだった」と悔やむ気持ちを表し、"spent the time" は「時間を費やす」という意味です。"studying for your test" は「テストのための勉強をする」に該当します。