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