It's a mistake to think that just because children can't understand everything about God, they can't understand something about Him. Jesus rebuked His disciples when they tried to keep children from Him -- and we shouldn't keep them away from Him either (see Mark 10:14).
What does a small child learn from being brought to church (or to a class at church designed for children)? First, they will learn that church is important to you. They may not realize why -- but they'll realize it's an important part of your life every week. You'll be setting an example for them that they'll never forget.
As they grow older, they'll also learn about the Bible and about Jesus. They'll realize that God loves them and wants to be their friend. They'll also understand that He makes a difference in our lives, and He wants us to turn away from bad things and do what is good. They'll profit too from books and Bible lessons designed for children their age.
The most important thing you can do, however, is to let your child see that Christ makes a difference in your life. Get a children's Bible storybook and read it to your son every day. Pray before meals, and pray with him also. Let the truths God has given us in the Bible guide your life as a parent, and "Teach them to your children... when you sit at home and when you walk along the road" (Deuteronomy 11:19).