You can't force children to do homework in The Sims 2, but you can create an environment that encourages it:
Remember: Sims have free will—they may choose play over study. The key is positive reinforcement and good environment.