If you keep your seedlings in warm conditions and if they are not getting quite adequate lighting they will become leggy. So ideally you would move them somewhere bit cooler and under better light. When you prick out the seedlings into larger pots you can 'drop' the seedling deeper into pot..so the seedleaves are just above the compost..almost touching..and then keep them in somewhere cooler and brighter you will get perfect plants.
Even if you plants are bit leggy when it comes to planting outdoors, you can still bury the legs deeper and have sturdier plants ;)