The song "If I Had a Hammer" is a protest song that was written in the 1940s.
The song's purpose was to promote social and political change, specifically in regards to civil rights and equality. The lyrics focus on the power of love, unity, and collective action to create a better world. The hammer in the song represents the power of the people to create change through their actions.
The song was a part of the larger civil rights movement that was taking place in the United States at that time. It became associated with the labor movement and was often sung at protests, rallies, and other events where people were advocating for social justice and unity.