Why are W, S, N, E highlighted on a flight management computer?
N, E, S, W is definitely used for entering lat/long coordinates. On the Airbus graphic in the question, you can see the pilot has entered their starting latitude and longitude with N and W.

But why are they highlighted? I'm going to guess and say it has to do with the transition between old-style numeric nav computers and "modern" FMS. Old style IRS only had a numeric keypad like this Concorde unit:


(Source)

and you can see that N, E, S, W is entered on the 2, 6, 8, 4 keys. So instead of typing "3253.9N" on the CDU you'd hit "325392". You'll still find these numeric keypads today on some forgotten corner of the overhead panel for who knows why, even on a 777.

I think the squares are a cue for the old time pilots that you can't enter a N coordinate by hitting 2, you have to hit the N key, and it also helps them find it.