If you want to change admin configuration with the code you need to create UpgradeData scripts for set of changes. This way each time code is deployed and
setup:upgrade command is run, changes will be reflected in the database, in the admin panel.
A lot of configuration is default, handled in
config.xml file. You can also create your own module with config.xml file where you can specify inital configuration. Just make sure your module is loaded after core modules or 3rd party modules. This way configuration in
My/Module/etc/config.xml will overwrite default settings.
However, if configuration is already stored in the database, you should use UpgradeData scripts where you can set system configuration.