Buffers are used in electrophoresis to create the pH and conduct the current. The buffer ions will carry the current during electrophoresis.
The buffer's pH setting determines the solutes' net charge. The pH ionizes these solutes, and the resulting net charge determines which electrode the solutes migrate toward. The buffer also maintains the pH throughout the sample's electrophoresis.