Why won't my iron golem farm work?

Solution 1:

In order for the farm to work, you need to block the sky light from reaching the area at maximum intensity (15) for it to be recognized as a "house". Just place a roof made of opaque blocks above the farm.