Like a lot of things, it's probably 90% "getting in the door". If you've got a job as a Java/C++ programmer, you might be able to get transfered to an embedded project. Or, if you work for a small company, you might be able to do some system-level programming and some lower-level embedded programming.
Look-up some job openings and see what the requirements are....
In order to get hired straight out of college, you'd need lots of hardware knowledge. I suspect that lots of embedded programmers actually have an EE degree with a strong programming background. (It looks like my old college has embedded courses offered by both the EE and CS departments.)
I was very bad in electronic subject in University.
You need to understand digital electronics. You need to understand how basic logic gates work (and-gates, or-gates, flip-flops, shift registers, etc.) You should know something about how PLDs work.
You should understand what the address & data lines on a memory chip do, as well as the other control lines. If the hardware engineer tells you, "The RAM chip-select never goes low", or "Data line 3 looks like it's shorted to ground", you've got to understand what he's talking about.
If you are working on a new design, you are working on non-debugged hardware and non-debugged software. You can't just say, "That's a hardware probem." You have to write the code to prove it's a hardware problem and you have to write the code to help track-down the hardware problem.
You need to understand the machine/assembly code for the processor you are working on.
You should know how to use an oscilloscope and logic analyzer. A lot of times, you'd be working with a hardware engineer, but you've got to understand what he's doing and what you are seeing on a 'scope or analyzer.
You should be able to understand the datasheet for a microcontroller/microprocessor as well as the various peripheral/support chips. Have you looked at the ATmega datasheet? It's 400 pages! If you are not intimidated by the datasheet, tha't's a good start. You've got to understand what's going-on inside the chips and how the various chips are communicating.