An allylic double bond can be said to be both electron-donating and electron-withdrawing, depending on the context. The simpler way to explain this is based on the idea of resonance. Both the allyl cation and allyl anion are stabilised by the presence of this double bond.
Source
Source
The behaviour of allylic double bonds can also be rationalised based on molecular orbital (MO) theory. A molecule containing a $\pi$ bond has both an antibonding $\pi^*$ MO and a bonding $\pi$ MO. Due to the lower strength of a $\pi$ interaction, compared to $\sigma$ interactions, the $\pi$ MO is not too lowered in energy and the $\pi^*$ MO is not too raised in energy, relative to the energy level of the $\ce {C}$ p orbitals. The consequence of this is that, to attain greater stabilisation of the molecule, this filled $\pi$ MO can interact with empty orbitals at adjacent sites in the molecule and this empty $\pi^*$ MO can interact with filled orbitals at adjacent sites. The allyl cation and allyl anion are just two examples to illustrate the above concept.
Other systems illustrating these effects would be the conjugated enone, as well as allyl halides. For the case of the enone, the effect seems to be more of an electron donation as the $\ce {C=C}$ $\pi$ bonding MO interacts with the $\ce {C=O}$ $\pi^*$ MO. For the case of tha allyl halide, it also seems to be that there is electron donation of the allylic double bond to the partially positively-charged $\ce {C}$ bonded to the halogen atom as the $\ce {C=C}$ $\pi$ bonding MO interacts with the $\ce {C-X}$ $\sigma^*$ MO.
From these examples, we can see that the electronic effects of the allylic double bond is highly dependent on the system we are considering. We can also seem to qualitatively derive the rule of thumb that the allylic double bond donates or withdraws based on the "needs" of the adjacent site. If it is electron-deficient, there would be donation from the double bond. If there is a site of high electron density, there would be withdrawal towards the double bond.