Amos 5:21-24 (ESV)
"I hate, I despise your feasts,
and I take no delight in your solemn assemblies.
Even though you offer me your burnt offerings and grain offerings,
I will not accept them;
and the peace offerings of your fattened animals,
I will not look upon them.
Take away from me the noise of your songs,
To the melody of your harps I will not listen.
But let justice roll down like waters,
and righteousness like an ever-flowing stream."
Let me give you the 21st century translation of this. "I hate it when you go to church. I hate it when you tithe. I hate it when you sing your worship songs and play your guitars. When you do these things, but don't treat your brother/sister with justice and live out your so-called faith, I am not pleased!" (NMV - New Myers Version) Bottom line: God doesn't want our religious habits unless he can have our hearts/lives/obedience first.
(The New Testament tie-in on this one is in Acts 7:42-43 where the early church deacon, Stephen, refers to Amos 5:25-27 in his sermon before he was stoned. He reminds the religious leaders how they turned away from God even when he was present with them in pretty visible ways.)