It is a matter of personal preference
Answer: The decision to devein shrimp is basically a matter of aesthetics.
With large shrimp, it is fairly easy to devein them by slitting along the back and lifting out the vein with a knife. Most cooks will not bother deveining medium-sized or smaller shrimp, unless they look particularly dirty, although one will occasionally taste a tad gritty when left intact. You can see the vein through the shell and meat, so use your own judgement.
Unless you are particularly patient and fussy, do not even bother with small shrimp. It could take literally hours. Many suppliers are now offering deveined shrimp, which is done without splitting the flesh or even removing the shell.
And while we are speaking of aesthetics, you can leave the tail on in dishes where it is obvious and conspicuous. However, in recipes where a heavy sauce may disguise the tail, you should remove it rather than surprise a guest with an unexpected crunchy bite.
On the other hand, some people actually enjoy eating the tail when it is deep-fried and crunchy.