How to find the possible valence states of elements in the lower end of the d block and the f block?
[For silver], why don't the electrons in the 4d orbital move to the 5p orbital?


In the case of silver, this is likely because the energy separation between the 4d and 5s orbitals are quite large (absorbing in ultraviolet region, which is why silver appears white/silver), so the energy separation between 4d and 5p would be even larger.

In general, when you write down the electron configuration you are writing down the ground state, i.e. the most stable configuration. While it is possible in principle to move electrons from 4d to 5p, it will not give you the most stable configuration as moving that electron requires a large amount of energy. 

For inferring the likely valence states, you can only use orbitals with unpaired electrons, and/or move the electrons that are not separated by large energy differences between different orbitals to make hybrid orbitals with unpaired electrons. In this case, as you cannot move 4d electrons to 5p (which would make some kind of spd hybrid orbital), you can only have a valence state of 1 from the unpaired electron in 5s.


  Is it possible for any elements [to move their electrons between $n$d and $(n+1)$p orbitals]?


Yes, but only for elements nearer the top of the periodic table (and not at the very top, as you will then not have any accessible d orbitals). Period 3 and period 4 (I think) would be most likely to do this. For example, phosphorus can have a valence state of 5, and sulfur can have a valence state of 6, both by involving their accessible 3d orbital, to make hybrid $\ce{sp^3d}$ and $\ce{sp^3 d^2}$ orbitals respectively. 


  When the f orbital is [completely] filled with 14 electrons, should we take it in consideration to find the valence states?


In general, no. When the f block is completely filled, the electrons in the f orbital are generally assumed to be core-like, i.e. stable, or low in energy, therefore will have a large energy gap to the other electrons in 6s, 5d and 6p (or 7s, 6d and 7p), and do not tend to participate in bonding/valency. There are possibly one or two exceptions, but I cannot recall them right now. 


  When Z=58, can you show me the electronic [configuration] and how do we form the valence state(s)?


Z = 58 is Cerium, which has the following electronic configuration: $\ce{[Xe] 4f^1 5d^1 6s^2}$. 

On paper, it will appear that due to the diffuseness of the orbitals 4f, 5d and 6s, it is probably unusual to form covalent compounds to cerium, and you would expect a valence state of 3 (if you only use the 5d and 6s electrons), or a valence state of 4 (if you also use in addition the 4f electron).

It was found the 4f is actually near the energy of 5d and 6s, giving rise to a variable electron structure and a valence state change of 3 to 4 when cerium is cooled or compressed. Moreover, it is possible to form organocerium compounds with a valency of 3. By the way, this is not something that you can deduce simply by looking at the electronic configuration. You have to find this out empirically, using experiments!