Hot water tank heats up, but when water is hot enough electrical circuit breaker trips. This is not the breaker on the upper thermostat, but the power supply.
Could be lots of things. There is a troubleshooting walk-through in Tanklets, under Electric Water Heater Issues. If you are good with a multimeter, I suggest you run through it. If you're not, I suggest you get a pro to do it, since you can get killed very quickly with an electric heater.
Does the whole tank heat up before the breaker trips or just the top half?
You could have a problem with the lower thermostat and/or element. When the tank is cold and you reset the breaker, the top thermostat supplies power to the top element. When the tank above the top element gets hot, the top thermostat transfers power from the top element to the lower thermostat. A problem in the lower half would cause the breaker to trip when the top thermostat transfer power.