There are various celestial cycles that influence moods. The most efficacious or apparent of these are the Planetary Hours within each day. People tend to be more angry during the Hour of Mars, and that is often when arguments break out, for example. The Moon, with the phase she is in, the Sign she is in, the Mansion of the Moon within she resides, and the Aspects she makes also influence mood. As does the Ascendant and the Lord of the Ascendant at any given time.
As for mood affecting magick, I can’t say my mood has affected the outcome of my magick too much, as far as I can tell. But I try to perform magick in a joyous state of mind, and otherwise in a calm state of mind. I used to perform a lot of magick with the GoM’s works, where emotion is important, but emotion is a way for your Soul to move your Spirit and join with the spirits or other forces you are calling upon.
On the astrological effects, check out my posts here:
The success and failure of all actions can be seen through the state of the heavens at any given time. This is the foundation for traditional electional astrology. However, a singular factor like the Moon being in an innapropriate phase or the planet ruling over the thing desired being retrograde or in detriment, fall etc. Is not enough to cause the magick (or any mundane action) to fail on its own. Reality is more complex than that, and the heavens reflect this. So, a very important factor is also the appropriate Houses of Heaven, their position and their Lords. And they change signs every 1-2 hours, and are dependant on where you are in the world, just like the Planetary Hours.
Now, will the magick work regardless so long as you do it right, in the right state of mind? From observation, no, not likely at all. However, it will be rare to perform magick under extremely unfortunate times, but common to perform it under rather weak times, and often this weakness can be enough to cause it to fail. My advice to you would be to not worry about this too much, because to learn these things takes a great deal of knowledge and learning. However, there are various electional rules for magick given in the first book of the Lamegeton that uses the Planetary Days and Hours, as well as using the Moon, that can be helpful. More complex electional rules can be gathered from the Second Book of Agrippa’s Three Books of Occult Philosophy.
Otherwise, use your intuition on when it is a good time to perform magick.
And keep in mind, this art of astrology is spiritual, not a material science:
This is the art of observing those patterns descending from the very Soul and Spirit of the World, which all individuals are subject to.