Dear Neha
You did not mentioned about your cell type. From my experience, X-gal staining needs to be optimize for specific cell type.You may check the whether the working solution has been prepared accordingly. Try to avoid repeated freeze-thawing the solutions. I usually aliquot working stock to least required volumes to avoid this. You may optimize your working concentration molarity, incubation time as per your cell type. Be careful for fixation the cells, prolonged fixation may damage the cell. Try to take stained cells picture as soon as possible, sometimes this is also responsible for bad staining results. Last but not the least, expertise of the microscope is a key to get good staining results.
Best wishes