A good way to start terraria on a magic build is to get yourself some gem staffs. Also try to explore the undergound to get some useful accessories. Collect falling stars from the sky and use them to craft mana crystals to increase your total mana. If you have a gravitational potion, try your luck finding a star fury. A melee weapon, but is a really good weapon. In my opinion, there arent really that much good magic stuff until the skeletron is defeated.
If you read the wiki, try finding water bolts in the dungeon, or go craft yourself a space gun from meteorites.
For short:
Before skeletron:
Best to use melee or a gem staff.
After skeletron:
Scavenge for water bolts or find some magic based weapons in golden chests or go craft yourself a space gun.
Once hardmode is enabled and activated, if the wall of flesh dropped the laser rifle, use it. In my personal expeience, the best magical weapon that can be obtained easily with relative ease is the magic dagger, a drop from mimics. Try to flatten out a mountain (dont hammer out the backdrops) and consume some battle potions and use water candles to easily spawn the mimics and get the magic dagger (and all their other equally powerful drops). A good endgame magic weapon as of now in my opinion would be the Spectre staff or the leaf blower.