The key to non-stick cooking is to heat up the pan enough before adding oil.
This allows the microscopic "teeth/pits" on the surface of the to pan close up as the metal expands from heating.
Only after reaching this point, add oil.
If the recipe calls for a lower heat, the pan will still remain non-stick even if you let it cool down, now.
Otherwise, these teeth/pits will bite down on the food that is being cooked.
Use the " water test " to know when the pan is hot enough to add oil.
Besides being fascinating to watch, passing the water test ensures the pan becomes amazingly non-stick.
When the pan is hot enough, water will ball up like mercury and slide around the pan without evaporating.
The temperature required is pretty high, but I've found the non-stick properties remain if I add the oil and let the pan cool to the cooking temperature I want.
Note: preheating the pan like this applies to non-stainless steel pans, but water only balls up like mercury on stainless steel.
Also this may not be safe to do on a Teflon-coated pan.
Detailed explanation of how/why this works:
On properly heating your pan
cooking.stackexchange.com/users/398/Leftium
I like to use low heat and a lid on a teflon pan.
The lid helps the top side of the egg set faster, and prevents the underside from over cooking.
Of course, this is easier if you have a glass lid.
(also, as others have noted, it is important to add fat and to preheat the pan)
cooking.stackexchange.com/users/4442/michael
First thing to do, make sure your pan is at the correct level of heat (around the mid-range on my stove top).
Then, make sure you spray your pan with some food release.
Then, crack the egg into the middle of the pan, and let it cook.
You shouldn't have any problems.
Don't have the heat too high, don't start with a cold pan.
Teflon coated should work like a charm.
cooking.stackexchange.com/users/3630/mrwienerdog
Although you've said you've used a teflon pan do you normally have problems with the pan in general?
If so it might be worth buying a new one.
Keeping the pan at a low heat throughout can help with preventing sticking (although admittedly it makes the egg take longer to cook).
Also, if you wait until the egg has cooked through a bit before trying to move it at all it should make it a bit easier and less likely to break.
If you wait until the egg has at least started to slightly bubble it should be easier for you.
Good luck!
cooking.stackexchange.com/users/5162/nixy 
There is absolutely no need for a teflon pan, leftium has is correct about heating the pan before adding any fat.
I prefer to get a (cast-iron) pan smoking hot, add the egg, and quickly put the egg in the oven, or broiler.
The Teflon pans on the market are still fairly fragile and eventually the Teflon degrades and begins to get into the food.
Hard anodized pans from Calhpalon are great non-still pans with a surface harder than steel.
cooking.stackexchange.com/users/6135/evanlivingston
Egg quality makes a difference too.
I recently switched from standard grocery quality eggs to organic free range and it made a big difference.
The taste is better and they don't seem to stick as bad.
cooking.stackexchange.com/users/40426/Michael
In addition to the suggestions above try using a lid and after the white has begun to solidify add a small amount of water and replace the lid.
The water will immediately become steam and poach the top of the egg,
cooking.stackexchange.com/users/84105/Leo
I've recently found a recipe that I really enjoy, but it calls for a sunny side up egg. Every time I try to fry an egg in this way it ends up sticking to the pan, the yolk breaks, and it ends up as an eggy mess.   I've tried multiple pans including my cast-iron pan, a teflon, pan, and others but they seem to always stick. What am I doing wrong?
Frying Eggs—Sticking to the Pan
cooking.stackexchange.com
<eggs><frying>
cooking.stackexchange.com/questions/13210
cooking.stackexchange.com/users/296/Vecta
Wait until the pan has reached the correct temperature before adding the oil, and try using a lid and adding a little water after the white has started to solidify a little. The pan should be hot enough before cooking. Use a lid and a little water. Wait until the egg starts to bubble slightly before you flip it.
The pan needs to be very hot before adding the egg. Use a lid and a little water. The pan should be at a low heat to prevent sticking. Wait until the egg starts to bubble slightly. Higher quality eggs are less likely to stick.