You should be able to do it with the code below. Just replace the layer name with the actual name of your layer. Change the boolean to true if you want the effect to be on and false for off.
app.project.activeItem.layer("layer name").effect("CC Image Wipe").enabled = true; // Replace the layer name to actually name of the layer
//True to turn on the effect and false to turn off the effect