Allagan coins: Yes, their only purpose is to sell them for gil.

Converting gear to materia: If you've used a piece of gear long enough for it to reach 100% spiritbond, then you can convert it to materia, provided that you've completed the level 19 sidequest Forging The Spirit in Central Thanalan. You can't control what type of materia you get, but even the nearly useless elemental resistance ones are worth more than the few gil you can get from just selling the used gear to a vendor, and if you get one of the better types of materia it can be far more.

If, when you out-level and replace a piece of gear, it's not quite up to 100% spiritbond, so you can't convert it yet, but is getting really close, then keep it for a bit and switch back to that temporarily while doing simple content. Then when it hits that 100% spiritbond, you can do the conversion. The only time I'd ever just sell a used piece of gear to a vendor is if I got a better replacement so soon that the old gear has a really low spiritbond %, and it's something that I won't be using again later for leveling another class.