Just wondering in case the pilot is unfamiliar with the airport / terrain or is flying at night and wants obstacle / terrain separation.
It depends what you mean by 'flying a SID'. If it is just following the procedure without violation of VFR (i. e. you are above VFR weather minimums for a given airspace, you maintain your own separation from traffic, don't violate ATC clearances, don't enter controlled airspace without a clearance etc.) - yes, it's perfectly legal. You can fly any route you want, your choice (again, I assume that you do not violate ATC clearances).
If you mean by 'flying a SID' obtaining an ATC clearance to fly a SID - if it is an IFR clearance, than no, it is illegal. You cannot request IFR clearance if you or your aircraft is not IFR rated, except the cases when you are training for an IFR (and have a CFII next to you).
You'd still have to follow VFR procedures, but nobody is going to stop you from flying the routing of an IFR procedure up to the point where there are published VFR procedures (within the restrictions imposed on VFR flights of course. E.g. where I train VFR is only allowed up to 1500ft, and the immediate area around the airport has specified VFR approach routes and pattern turn locations which don't match the IFR charts for the field in any way).
Of course if you're training for an IFR rating different rules apply.