need more details

It's tough to give advice if all we get is "early marines/marauders." Ideally, if you can, post up a typical replay of you two losing to a strategy like this. That way we can all see exactly what they are doing, what you are doing, and where the mistakes pop up.

If you can not put up a replay, tell us around what time the Terrans attack. That way we get a little bit of a better picture. As a general answer, a protoss's best defense against early pressure of almost any kind is the sentry. Forcefields and, in the case of marines, guardian shields help tremendously in holding off all the stuff other races can throw at you in the early game.
I wish I could say anything more specific but without a replay it's really hard to.