Get some good armor (at least Shadow Armor) and some good long-range weapons (a Minishark would be optimal, but if you have a bumload of Fallen Stars, you can get and use a Star Cannon). Also make a big flat surface (battleground) before engaging in the battle. It's easier to do it on a flat surface.
Read some more: http://wiki.terrariaonline.com/Skeletron