Although this is an old question, I found it while trying to find how to specify the base type to cast to, so I'll answer the original question as well.
Suppose you have a node that emits an "input_event" signal. This signal will give you a base InputEvent but that doesn't tell you what kind of input you just received. Maybe the mouse was moved or there was a click or the user entered a keyboard input. By trying to cast that input event to the InputEventMouseButton type, you can test whether the input was a mouse button input and run your code only in that case instead of on all types of input events.
Another case where you might want to cast is if you want to call a function with an argument that you don't quite have the right type for but you have something that can be cast into the right type. For example, you can safely cast an integer to a float because it effectively just means adding a decimal point and zero on the end of your integer. Now if you had a function that needed a float instead of an integer, you have your float.