Playing with Robocode is a very good way to learn about Java and programming in general.
I agree with Skotty that the best way to learn about Robocode is to absorb as much of this wiki and the Robocode API as you can. Robocode/Game Physics, Robocode/My First Robot, and the Robocode API are the best places to start.
It's also a good idea to learn about how robots work by reading other robots' code. The Sample bots and the Super Sample Bots are a good start.