2 situation here
1- he build a good combination like as straight or tree of kind.
2- he following to build good combination and field so trying to bluffing you with all in (he broke to trying be flush )
From the info you gave, it sounds like a set of 3,4 or 5s.
If so, excellent fold.
Just wondering: you made a 'standard' 3/4 pot bet on the flop; would a 150% pot raise have made any difference?