Model based studies of some optical and electronic properties of narrow and wide gap materials