Note: I am using the following pages for information sources:
http://support.screeps.com/hc/en-us/articles/203016342-ConstructionSite
http://support.screeps.com/hc/en-us/articles/203086021-Territory-control
Ramparts are currently planned to cost 2000 energy and have from 1000 to 7000 hits, depending on game mode / RCL. I believe that ramparts are too expensive for the limited protection that they provide, and that their high cost will discourage their use.
My proposal is to substantially decrease the cost of ramparts and substantially increase their hits at lower RCLs. Since most of my experience has been in survival mode, it would probably be wise to watch how Early Preview unfolds for a little while before making any changes. In Survival Mode at least, I do not think ramparts are currently a viable strategy at all.
I think a useful way to look at efficiency is in terms of hits/energy. A single rampart could add 1000-7000 hits of protection at a cost of 2000 energy, giving a hits/energy efficiency between 0.5 and 3.5. A regular TOUGH part, however, gives 100 hits at a cost of 20 energy, giving an efficiency of 5. Furthermore, ATTACK parts have an efficiency of 1.25 (higher than some levels of ramparts), in addition to their valuable offensive properties.
The 2000 energy to build a single rampart could instead be used to create 100 TOUGH parts (10000 hits) or 25 ATTACK parts (2500 hits with up to 750 hits/tick of offense). To surround a spawn or other object, it takes at least 8 ramparts, costing 16000 energy. Basically, it is a lot cheaper to build an army to defend a spawn than surround it with ramparts.
A more direct comparison is with regular constructed walls, with 6000 hits for 500 energy and an efficiency of 12. Walls are many times more efficient than ramparts for creating a barrier. Also, if you want to have a "gate" in the wall, it is cheaper to have a hole in the wall with some guards than use a rampart as a gate.
The point I'm trying to make is that other forms of defense are far cheaper and stronger than ramparts. In order to turn ramparts into a viable defense strategy, their cost effectiveness should be increased.