How do I install modules using a module?
If there are modules from which your module depends, your module should declare them as dependencies, in its .info file. Supposing that your module is my_secret_module.module, and it depends from first_module, and second_module, my_secret_module.info should contain the following lines.

// Drupal 5
dependencies = first_module second_module

// Drupal 6, Drupal 7, and next releases
dependencies[] = first_module
dependencies[] = second_module


In this way, your module cannot be enabled of the other modules are not enabled too.