How do stars affect the behavior of organisms, primarily humans? In other words, does astrology work?

You are asking two separate questions!

Yes the seasons (which are in part determined by the sun and surrounding planets) and especially the phases of the moon have an enormous impact on very many species in terms of the regulation of migration and reproduction etc. Whether the same can be said of humans is debatable.

In contrast, there is no scientific evidence I am aware of that astrology (which I take to mean as the belief that you can predict the future of human beings by knowing when and where they were born) works!