In case you are planing on repainting your exterior walls and repair stucco there are a few things to check before you start. Firsthand you must make sure whether there are some areas on your walls that need slight repairing.
In case there are small cracks that you find (hairline cracks), there is no need to worry as the paint itself will repair these small damages. However, when you are dealing with slightly larger cracks or patches you need to repair these before you start to paint.
The cracks need to be covered by a sealant, recommendedly an elastomeric sealant. The next step is filling the patches or cracks with a mixture of stucco (this has to be of the same texture as the stucco used on your walls) and finally paint the area to match the rest of the finish. In case there are several cracks or patches, the whole house may need repainting to avoid the repaired spots to come forth.
When the damage is vast or big enough to make you worried (like loose framing), do contact an expert who will properly assess what the next step should be as by fixing it by yourself may do more damage than good.