If you have your spatial data in a PostGIS database, try ST_AsSVG, e.g.:
postgis=# SELECT ST_AsSVG(ST_MakePoint(1797227.3141, 5431330.2559));
st_assvg
--------------------------------------------------
cx="1797227.3141000001" cy="-5431330.2559000002"
(1 row)
(The linestring and polygon conversions are much more tricky, and thus very useful to have.)
If you don't use a database and are familiar with C, you can use the liblwgeom library (from PostGIS, but independent of PostgreSQL). See the API docs for lwgeom_to_svg.
Note: these methods only provide parts of the SVG geometric elements, not the file.