If $G$ is a commutative monoid (for your question we will want $G = \mathbb{Z}$), then $A[G]$-comodules identify with $G$-graded $A$-modules. A reference is Demazure, Gabriel, *Introduction to Algebraic Geometry and Algebraic Groups*, II, §2, no 2, Example 1. Indeed, if $M$ is an $A$-module with an $A[G]$-module structure given by the coaction $\mu: M \to M\otimes_A A[G]$, the corresponding grading $M = \bigoplus_{g \in G} M_g$ is given by $M_g = \{m \in M : \mu(m)=m\otimes g\}$. Conversely, given a $G$-grading $M = \bigoplus_{g\in G}M_g$, for $m\in M$, let $m_g$ be the projection of $m$ onto $M_g$, then the map $$\mu : M\longrightarrow M\otimes_A A[G],\quad m\mapsto m_g\otimes g$$ is an $A[G]$-coaction on $M$. These functors are mutually inverse, and define an equivalence of symmetric monoidal categories. Hence, $A[G]$-comodule commutative algebras identify with $G$-graded commutative $A$-algebras. Now assume that $R \to \underbrace{R\otimes_A A[\mathbb{Z}]}_{R[x,x^{-1}]} = R\otimes_A \underbrace{A[x,x^{-1}]}_{(\mathbb{G}_m)_{/A}}$ is a comodule commutative algebra. The corresponding $\mathbb{G}_m$-scheme $\mathrm{Spec}(R)$ is a torsor if and only if 1. $R$ is faithfully flat over $A$, 2. The natural morphism $\mathrm{Spec}(R)/\mathbb{G}_m \to \mathrm{Spec}(A)$ is an isomorphism, i.e. the natural morphism $A \to R_0$ is an isomorphism, 3. The natural morphism $\mathbb{G}_m \times_{\mathrm{Spec}(A)} \mathrm{Spec}(R) \to \mathrm{Spec}(R) \times_{\mathrm{Spec}(A)} \mathrm{Spec}(R)$ is an isomorphism, i.e. the natural morphism $R \otimes_A R \to R[x,x^{-1}]$ is an isomorphism. For $n,m \in \mathbb{Z}$ the natural morphism $R_n \otimes_A R_m \to R_{n+m}$ is an isomorphism since this is so when we tensor with $R$ over $A$ (by faithful flatness). It follows that $R_1$ is invertible and that $R_n \cong R_1^{\otimes n}$ for $n \in \mathbb{Z}$.