I know it's something with when "2" is visible, but is there an optimal time? It looks like there's different degrees of the speed boost.
There are 2 levels of boost. If you are driving a kart, you can tell which one you get by how many of your exhausts spit fire. If both spit fire, then you've got the maximum boost. If you are driving a bike, then your bike will do a wheelie when you get the maximum boost.
If you watch the numbers come on the screen it goes 3 - 2 - 1. The numbers kind of drop in from the top. You need to hit the button just as the number 2 gets to the bottom of it's downwards animation. It takes a bit of practice but after a while it becomes second nature.
Another tip is to count it down in your head - then you get the timing just right naturally!