Electronic and optical properties of SiGe alloys within first-principles schemes