If it's a plastic encased model, microfiber cloths and window / mirror type spray cleaner works well, the all purpose versions work too. They are ideal for hard plastic (don't use anything heavy duty). Soak an area on the cloth with it and go to work, don't give up until grime and dirt are lifted from grooves and surface in general. Be a bit careful with logos, names and numbers. To shine and protect there are kits for cleaning dash board and plastic parts for cars, they might be worth trying. Cotton buds and tooth picks can help a lot to get into,corners, edges of buttons and joints in the casing.
If it's yellowed or stained with age, there are ways to bleach hard plastic (water, peroxide /oxygen based stain remover, and thickening agent). I suspect it's stubborn grime causing this, because if this type of plastic can be soaked in laudry powder, or a turn in the dish washer it will have much the same effect. With a sewing machine there has to be a different aproach than the dishwasher of course.
If it's an all metal machine, the paint might need a gentle approach. Microfiber cloths and soapy water isn't wrong, traces of sewing machine oil have often stained the machine, but it usually comes off with out too much problem. Window / surface cleaners should in theory be fine for hard paint, but don't rub too hard on models like Bernina, Elna (green, greenish and ivory or sort of colors), the paint is only a thin delicate layer and not as hard as some enamel paints. Those concrete gray Pfaffs have this type of paint too. A recin based car polish (liquid type that dries quickly and easily buffs off) can further lift up dirt and protect the machine a bit from wear and grime in the future. It works well for shining up the delicate paints, but be careful with names and logos on the machine.
If you have and old machine with shellac and gold decals, don't start out with anything harsh. With very grimey machines I start with cloths well wringed up and soapy water. The gentlest fore these are sewing machine oil and cotton wool, and often it will get you very far. From there it's soapy water, gradually stronger degreasers on stubborn grime, but usually it's not needed. Don't leave the surface damp, and the same resin based car polish as already mentioned will help further shine an clean up shellac too.