When can I use “thy” instead of “your”?
When? Pretty much anytime before about the year 1780.
Edit: in In all seriousness, "thy" (and its other forms like "thou", "thee", and "thine") is the equivalent of "tú" (in Spanish) or "du" (in German). It is just the familiar form.
Unlike every other Indo-European language, we stopped using the familiar form about 200 years ago, except when we are deliberately attempting to invoke an archaic ambiance, suggesting Shakespeare or the King James Version of the Bible.