It turns out, it’s very hard to tickle yourself because your brain anticipates things going on around you in order to help speed up response times. More technically, the cerebellum monitors body movements and can also distinguish between expected sensations and unexpected ones, generally resulting in diminishing or completely discarding expected sensations, while paying much more attention to unexpected ones.
So your brain is actively anticipating touch sensations. When it is doing this, it is also actively discarding sensations that it deems unimportant, like when you are typing and it significantly dulls the touch sensation in your fingertips so that you don’t really notice it unless you consciously think about it. This same type of thing happens when you try to tickle yourself.
So in short, you can’t tickle yourself because there is no element of surprise. Your brain is using the various internal sensory data it has available to anticipate exactly what is going to happen based on your movements and visual data. When the anticipated reaction and the actual reaction line up, your brain diminishes or even sometimes completely discards the sensation as a result of that action. On the other hand, when someone else is tickling you, there are unexpected sensations on the skin and these then can result in the tickling sensation being activated.
Source1, Source2, Source3, Source4, Source5