Power Problem with Leonardo

Does your code contain while(!Serial) or similar and makes use of Serial output to the PC.

Native USB can sometimes be tricky. Please post your code (and please use code tags when posting code) so we can have a look for other possible pitfalls.