Your electric airsoft rifle probably came with a cleaning rod, but if it did not come with one, you can purchase one at any sporting goods store for a few dollars. After each use, take the cleaning rod with a clean cloth patch and run it down the barrel. This will clean out any debris that may have settled in the barrel. The electric airsoft rifle will not perform well if debris left in the bore scratches the inside surface of the barrel.
If your electric airsoft rifle is full metal or has any metal parts to it, regularly clean the metal with any gun oil to help eliminate the chance of rust setting in. this is especially important if you have had a battle in the rain or snow. Dry and oil the gun immediately after your skirmishing.
And, if at all possible, keep your electric airsoft rifle stored in the box that it was originally packaged in. This will keep your rifle looking and performing like new.