The Replicator button on your inventory works like a vendor, you can sell unwanted items right on the spot for energy credits.
You'll get more going to a faction vendor (some civilians give even less, though, so watch out) than using the replicator, but with stuff like food and hyposprays it hardly matters since they're generally only worth 10-100 EC.
The replicator generally gives you 40% of the value listed in the item's tooltip. Faction venders tend to give 50-60%, but a few (especially Ferengi) will give less than 40%. For high-value items (anything of blue quality or better), you can usually get more money selling them on the Exchange to other players.
How many Starfleet Engineers does it take to exchange an Anti-positronic Photon Emitter?