As pickups are used to pick the sound and the body is not totally responsible for it, painting electric guitar does not affect the sound however, it can affect acoustic guitars where the body is plays a big role on sound generation.