On the one hand, we may define $\mathcal{O}_{\mathbb{P}^{n}}(l)$ as the invertible sheaf with trivializing cover $\{D(X_i): i\in \{0,...,n\}\}$ and transition functions $\left(\frac{X_i}{X_j}\right)^l$.
On the other hand, we may define it as the sheaf of modules induced by the graded module $K[X_0,...,X_n](l)$.
I would like to proof that these definitions are equivalent. One way could be finding transition functions for the sheaf of the second definition. If they are $\left(\frac{X_i}{X_j}\right)^l$ we are done, but I am finding hard to show this.
I have to say I find it pretty confusing me too, especially when I was reading Hartshorne.
Let's compute global section of the sheaf $\mathcal O_{P^n}(l)$. Let $s$ be such a section, i.e a family of regular map $s_i : U_i \to \mathbb C$ such that $\phi_{ij} s_i = s_j$, where $\phi_{ij} = (\frac{x_i}{x_j})^l$. (Usually people wrote $\phi_{ji}$ what you wrote $\phi_{ij}$ but this is not so important) .
Let's look at $U_0$ and $U_1$, we have $s_0 = f/x_0^a$ and $s_1 = g/x_1^b$. Since $(\frac{x_0}{x_1})^l s_0 = s_1$ we have $x_0^{l-a}f = x_1^{l-b} g$. In particular, $0 \leq a, b \leq l$ as e.g the right hand side has non poles at $x_0$ so the LHS too. If $a < l$ we can multiply both numerator and denominator by $x_0^{l-a}$, i.e we can assume $a = b = l$. So we have the equality $f/x_0^l = (\frac{x_1}{x_0})^l g/x_1^l$, this exactly means that in fact $f = g$, and similar argument shows that for any $i$, $s_i = f/x_i^l$. It follows that a section of $\mathcal O_{P^n}(l)$ is exactly an homogeneous $f \in k[x_0, \dots, x_n]_l$.