Short answer: I believe the answer is you can always do this, as long as you do it in the right way (which isn't always by taking global sections, so this complements the previous answer). I will focus only on a certain class of sheaves, however (though it contains most of the usual sheaves).
The observation you are making is essentially about Morita invariance of Lie groupoid cohomology. In this example, the Lie groupoids are $\mathbb{C}\rtimes L\rightrightarrows \mathbb{C}$ and $E\rightrightarrows E\,.$ These Lie groupids are Morita equivalent for the following reason: whenever you have a principal $G$-bundle $\pi:P\to X\,,$ the Lie groupoids $P\rtimes G\rightrightarrows P$ and $X\rightrightarrows X$ are Morita equivalent, via the map $(p,g)\mapsto \pi(p)\,.$
Now the cohomology of Lie groupoids with values in a module is invariant under Morita equivalence, and the topology of $X$ is irrelevant. To compute the cohomology of a Lie groupoid $G\rightrightarrows G^0\,,$ you need to form the nerve $B^{\bullet}G$, take the induced sheaf on each $B^iG\,,$ take a resolution of the sheaf on each $B^iG$ and then compute the cohomology of the total complex on $B^{\bullet}G\,.$
A module is like a Lie groupoid representation, except that the fibers over the base don't have to be vector spaces, they can be any abelian Lie group. The simplest examples of modules for a Lie groupoid $G\rightrightarrows G^0$ are ones of the form $G^0\times A\,,$ where $A$ is an abelian Lie group.
A module comes with a compatible action of $G\,,$ and in this case there is a canonical one: if $g$ is an arrow between $x$ and $y\,,$ then $g$ sends $a$ over $x$ to $a$ over $y\,.$ Note that we get a sheaf by taking the sheaf of sections of the module.
Now, in the example you gave a major simplification occurs: since $H^i(\mathbb{C},\mathcal{O}^*)$ is trivial for $i>0\,,$ and since $L$ is discrete (meaning that the cohomology of $L$ with respect to the sheaf $\mathcal{O}^*$ is automatically trivial in positive degree) we don't have to take a resolution of the sheaf, ie. we can compute the sheaf cohomology using global sections, ie. the usual groupoid cocycles, the same as how it's done for smooth representations.
Now to get to your question about how do we know which sheaf to use: if you have a Morita equivalence of Lie groupoids $H\rightrightarrows H^0\,,$ $G\rightrightarrows G^0$ given by a homomorphism $f:H\to G\,,$ and if you have a module $M\to H^0\,,$ one can pullback the module to get a module over $G^0\,,$ ie. $f^*M\to G^0\,.$ This is the sheaf that you use. For the example where the module is $M=G^0\times A$ we simply have that $f^*M=H^0\times A\,.$
To connect this with your example: on $E$ we are taking cohomology in $\mathcal{O}^*\,,$ which is the sheaf of sections of $M=E\times \mathbb{C}^*\,.$ From the above then, we know that the module we need to use on $\mathbb{C}\rtimes L\rightrightarrows \mathbb{C}$ is just $\mathbb{C}\times \mathbb{C}^*\,,$ whose sheaf of sections is just $\mathcal{O}^*\,.$ Therefore, together with the fact about $\mathbb{C}$ having no higher cohomology in $\mathcal{O}^*\,,$ we get that the cohomology can be computed as the group cohomology of $L\rightrightarrows *$ in the naive way (ie. where no resolution is taken), and where we are taking cohomology of the module $H^0(\mathbb{C}\,,\mathcal{O}^*)$ (this is a module over $*$) with the action given by the one you wrote.
There's a lot more to say, but hopefully what I said is somewhat comprehensible. I wrote about this in my thesis, if you're interested in more details (also I know this is question is super old): https://arxiv.org/abs/2205.02109v2