You can think of electrophile = lewis acid nucleophile = lewis base
Nucleophiles have a free lone pair electron to attack the electrophile.
Or you can see which molecule has a good leaving group. Electrophiles have leaving group 🙂
Once you do enough problems, you can usually identify nucleophiles right away since they reuse a lot of the typical nucleophiles like Tert BuOK, MeOH, etc
For nucleophiles, look for a negative charge or lone pairs that can attack. Write it like this :Nu-. Negative attacks positive. :Nu- -------> E+
For electrophiles, look for a positive charge or electron deficiency or partial positive. Write it like this E+. Positive is attacked by the negative E+ <--------:Nu-
Another way to remember is that nucleophiles are so negative and can't stand looking at positives be happy so it attacks anything that's positive b/c misery loves company. Kay, that was kinda dumb, but it helps to form association to help recall if the two really confuse you😳).