Automating module activation during installation of Drupal
You can create a custom installation profile


  Installation profiles combine core Drupal, contributed modules, themes, and pre-defined configuration into one download. Installation profiles provide specific site features and functions for a specific purpose or type of site. They make it possible to quickly set up a complex, use-specific site in fewer steps than if installing and configuring elements individually.


See How to write a Drupal 7 installation profile and the Install profile API for more info.