Rashguard can not be really considered a wetsuit but it is the lightest piece of clothing used for protection in water sports. Rashguard serves as protection against wax and neoprene rash. You get this rash because wax and neoprene are sticky and a bit abrasive. So constant rubbing of your skin against them can give you a rash.
Rashguard is also protection from the sun, good rashguard can be 100% UV resistent so it is wise to wear one if you are in water during midday and in low geographical altitudes.
And finally – rashguard can offer some warmth. Ordinary a rashguard is made out of lycra which will give you no warmth at all, but some rashguards have some aditional insulation, thermo material that makes them thicker and warmer. This insulation is not neoprene, if it is neoprene then we are talking about wetsuit top, not rashguard.
Maybe one more thing – rashguards have stitches on the outside. This is because if they are made to protect you from the rash, it would not be very smart to put stitches on the inside and get a stitch rash wearing them.