Generally hardness have a relationship with grain refinement. Generally Grain refinement increase with increase of tool rpm and with sharp-edge tool pin geometry keeping all other parameters constant. Generally, if grain sizes decrease ductility increases and hardness value decreases.
It's really difficult to answer this question by a general trend on process parameters.
Hardness evolution in friction stir welds depends on materials involved and their precipitation sequence. Depending on the alloys series (2XXX, 5XXX, 6XXX, 7XXX...) the precipitation sequence is different and also the reaction to process parameters. The temper on which the material is or the thickness you want to weld could be important points to choose your parameters.
Post-weld heat treatment (PWHT) is often used to reach higher hardness in the joint when a strong decrease took place.