Every day they killed a llama to make the sun god happy.

Literal

Every-day they [topic-は] sun [possessive-の] god [object-を] happy [into-に] make [purpose-ために] llama [object-を] killed.

~にする ('make X into Y / make X') turns the na-adjective 幸せ into a caused state — 幸せにする = 'make happy.' ために marks purpose. The mention of llamas and a sun god points to Incan ritual context — the Inca civilization performed sacrifices to Inti, their sun god, and llamas were among the most common sacrificial animals.