Do i need to use capacitors with a 5v voltage regulator?
Read the datasheet. It will tell you exactly what you need to know.

TI recommends a 0.22&nbsp;µF capacitor on the input. A capacitor on the output is optional, but adding 0.1&nbsp;µF there can help in some applications. For a battery charger, this is probably unnecessary.

Larger capacitors are not necessary, and may damage the regulator if the input is shorted. (See "Shorting the Regulator Input" on page 13 of the datasheet for details.)

That all being said -- as mentioned in comments, a linear regulator is probably a poor choice for this application, as you will end up wasting roughly 60% of the power you gather (7 V out of 12 V) in the regulator. A buck converter or MPPT will give you much better results.