Once you are familiar with his attack pattern, position yourself in front of him so that you will be just out of range when he attacks. After the lightning disappears, you can attack. Then, either back up to give yourself room for his next attack, or speed-flip behind him and wait for him to turn around. As you attempt to position yourself out of this alien's attack range, remember that he is walking toward you. This is the boss you face if you choose the left doorway at the end of the alien space ship.
Timing is the key.
Again, you will need to familiarize yourself with the frequency of this alien's attacks. Right before he attacks, use a flip to get behind him. You can usually attack twice while he is stopped. Then be prepared to get out of the way if he turns around. You cannot move while you are attacking, so make sure this boss has stopped moving before you attack, otherwise you may not be able to get out of the way quick enough to avoid taking damage.